From: Haavard Skinnemoen Date: Fri, 19 Sep 2008 19:09:30 +0000 (+0200) Subject: atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da45b66ec89bbf3a1c172688c35d4d3a6e8e757f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin This allows the mmc core to detect card insertion/removal for slots that don't have any CD pin wired up. Signed-off-by: Haavard Skinnemoen Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 39096083bb61..917035e16da4 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -1059,6 +1059,10 @@ static int __init atmci_probe(struct platform_device *pdev) host->present = !gpio_get_value(host->detect_pin); } } + + if (!gpio_is_valid(host->detect_pin)) + mmc->caps |= MMC_CAP_NEEDS_POLL; + if (gpio_is_valid(host->wp_pin)) { if (gpio_request(host->wp_pin, "mmc_wp")) { dev_dbg(&mmc->class_dev, "no WP pin available\n");