All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: tmio: Use mmc_can_gpio_cd() when validating for native hotplug
@ 2016-12-30 11:39 Ulf Hansson
  2017-01-05 11:50 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2016-12-30 11:39 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson; +Cc: Wolfram Sang, Simon Horman

To validate whether native hotplug is intended to be used, the tmio driver
checks whether the GPIO isr has been successfully assigned. This isn't
entirely correct, as GPIO could still be used for card detect, but in a
polling mode.

Therefore, let's convert to use the correct mmc interface,
mmc_can_gpio_cd() as it tells exactly what we need for the native hotplug
validation.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/tmio_mmc_pio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 3ca97f3..580ca9c 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1178,7 +1178,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
 	_host->native_hotplug = !(pdata->flags & TMIO_MMC_USE_GPIO_CD ||
 				  mmc->caps & MMC_CAP_NEEDS_POLL ||
 				  !mmc_card_is_removable(mmc) ||
-				  mmc->slot.cd_irq >= 0);
+				  mmc_can_gpio_cd(mmc));
 
 	/*
 	 * On Gen2+, eMMC with NONREMOVABLE currently fails because native
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-10 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-30 11:39 [PATCH] mmc: tmio: Use mmc_can_gpio_cd() when validating for native hotplug Ulf Hansson
2017-01-05 11:50 ` Wolfram Sang
2017-01-10 15:09   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.