[PATCHv7 5/5] mmc: dw_mmc: replace "disable-wp" from slot's quirk to host's quirk

Doug Anderson dianders at google.com
Tue Jul 29 11:01:19 PDT 2014


Jaehoon,

On Sun, Jul 27, 2014 at 7:29 PM, Jaehoon Chung <jh80.chung at samsung.com> wrote:
> Replaced the "disable-wp" into host's quirks.
> (Because the slot-node is removed at dt-file.)
>
> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
> Tested-by: Sachin Kamat <sachin.kamat at samsung.com>
> Acked-by: Seungwon Jeon <tgih.jun at samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c  |   12 +++++-------
>  include/linux/mmc/dw_mmc.h |    6 ++----
>  2 files changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 1ac227c..4a4f66f 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc)
>         int gpio_ro = mmc_gpio_get_ro(mmc);
>
>         /* Use platform get_ro function, else try on board write protect */
> -       if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT)
> +       if (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT)

It doesn't seem like it would be hard to include support for the old
binding (and just print a warning).  Then this could land ahead of the
device tree changes.

Generally I think we're supposed to keep support for old device trees
if possible (except in extreme cases).

-Doug



More information about the linux-arm-kernel mailing list