Message ID | 1483102054-1752-5-git-send-email-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show |
On Fri, Dec 30, 2016 at 1:47 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > Removing the callback also enables us to remove the sh_mmcif_get_cd() > altogether, as we convert to use mmc_gpio_get_cd() to the same kind of > work. > > Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Looks correct, would need a Tested-by ideally? Geert can you have a quick look at the Renesas patches in this series? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Linus, On Mon, Jan 9, 2017 at 4:04 PM, Linus Walleij <linus.walleij@linaro.org> wrote: > On Fri, Dec 30, 2016 at 1:47 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > >> Removing the callback also enables us to remove the sh_mmcif_get_cd() >> altogether, as we convert to use mmc_gpio_get_cd() to the same kind of >> work. >> >> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> >> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> > > Looks correct, would need a Tested-by ideally? > Geert can you have a quick look at the Renesas patches in this > series? I'm not really into MMC. Wolfram? Simon? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5f97055..7ba92a4 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1079,26 +1079,10 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->state = STATE_IDLE; } -static int sh_mmcif_get_cd(struct mmc_host *mmc) -{ - struct sh_mmcif_host *host = mmc_priv(mmc); - struct device *dev = sh_mmcif_host_to_dev(host); - struct sh_mmcif_plat_data *p = dev->platform_data; - int ret = mmc_gpio_get_cd(mmc); - - if (ret >= 0) - return ret; - - if (!p || !p->get_cd) - return -ENOSYS; - else - return p->get_cd(host->pd); -} - static struct mmc_host_ops sh_mmcif_ops = { .request = sh_mmcif_request, .set_ios = sh_mmcif_set_ios, - .get_cd = sh_mmcif_get_cd, + .get_cd = mmc_gpio_get_cd, }; static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host) diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 5ce5a2c..7cafc95 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h @@ -32,7 +32,6 @@ */ struct sh_mmcif_plat_data { - int (*get_cd)(struct platform_device *pdef); unsigned int slave_id_tx; /* embedded slave_id_[tr]x */ unsigned int slave_id_rx; bool ccs_unsupported : 1;
Removing the callback also enables us to remove the sh_mmcif_get_cd() altogether, as we convert to use mmc_gpio_get_cd() to the same kind of work. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/host/sh_mmcif.c | 18 +----------------- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) -- 1.9.1