Re: [PATCH] mmc: core: Fix start_signal_voltage_switch argument type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 February 2013 03:14, Fabio Estevam <festevam@xxxxxxxxx> wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
>
> Since commit 3714f4315354 (mmc: sdhci: update signal voltage switch code) the
> second argument of start_signal_voltage_switch has 'int signal_voltage' type,
> so update mmc core and the mmc host struct definition accordingly.
>
> Fix 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]
>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> ---
>  drivers/mmc/core/core.c  |    2 +-
>  include/linux/mmc/host.h |    3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 08a3cf2..c346bc7 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1325,7 +1325,7 @@ int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage)
>         host->ios.signal_voltage = signal_voltage;
>         if (host->ops->start_signal_voltage_switch) {
>                 mmc_host_clk_hold(host);
> -               err = host->ops->start_signal_voltage_switch(host, &host->ios);
> +               err = host->ops->start_signal_voltage_switch(host, signal_voltage);

No. Fixup shall be done in SDHCI instead. Otherwise other host drivers
will break instead.

>                 mmc_host_clk_release(host);
>         }
>
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index fd5fd5a..ad8b1a6 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -129,7 +129,8 @@ struct mmc_host_ops {
>         /* optional callback for HC quirks */
>         void    (*init_card)(struct mmc_host *host, struct mmc_card *card);
>
> -       int     (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios);
> +       int     (*start_signal_voltage_switch)(struct mmc_host *host,
> +                                                       int signal_voltage);
>
>         /* Check if the card is pulling dat[0:3] low */
>         int     (*card_busy)(struct mmc_host *host);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kind regards
Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux