Skip to content

Commit

Permalink
mmc: sdhci: Fix parameter of sdhci_do_start_signal_voltage_switch()
Browse files Browse the repository at this point in the history
3714f43 ("mmc: sdhci: update signal voltage switch code") changed the
type of the second parameter of sdhci_do_start_signal_voltage_switch(),
from "struct mmc_ios *ios" to "int signal_voltage" which causes the
following build warning:

drivers/mmc/host/sdhci.c:2044:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/mmc/host/sdhci.c:2044:2: warning: (near initialization for 'sdhci_ops.start_signal_voltage_switch') [enabled by default]

Use the previous type so that it matches the start_signal_voltage_switch()
definition from host.h.

Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Johan Rudholm <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
Fabio Estevam authored and cjb committed Feb 24, 2013
1 parent a4f8f25 commit 21f5998
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
@@ -1675,7 +1675,7 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)
}

static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
int signal_voltage)
struct mmc_ios *ios)
{
u16 ctrl;
int ret;
@@ -1689,7 +1689,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,

ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);

switch (signal_voltage) {
switch (ios->signal_voltage) {
case MMC_SIGNAL_VOLTAGE_330:
/* Set 1.8V Signal Enable in the Host Control2 register to 0 */
ctrl &= ~SDHCI_CTRL_VDD_180;
@@ -1762,15 +1762,15 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
}

static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
int signal_voltage)
struct mmc_ios *ios)
{
struct sdhci_host *host = mmc_priv(mmc);
int err;

if (host->version < SDHCI_SPEC_300)
return 0;
sdhci_runtime_pm_get(host);
err = sdhci_do_start_signal_voltage_switch(host, signal_voltage);
err = sdhci_do_start_signal_voltage_switch(host, ios);
sdhci_runtime_pm_put(host);
return err;
}

0 comments on commit 21f5998

Please sign in to comment.