Date:2010-07-20 01:34:59 (8 years 4 months ago)
Author:Maarten ter Huurne
Commit:f1f0dbd8c8e5a1dec5e46b85fba8e19fefdf73e8
Message:MMC: jz4740: Fixed card change detection.

The GPIO validity check was reversed.
Also removed some dead code.
Files: drivers/mmc/host/jz4740_mmc.c (1 diff)

Change Details

drivers/mmc/host/jz4740_mmc.c
761761static int __devinit jz4740_mmc_request_cd_irq(struct platform_device *pdev,
762762    struct jz4740_mmc_host *host)
763763{
764    int ret;
765764    struct jz4740_mmc_platform_data *pdata = pdev->dev.platform_data;
766765
767    if (gpio_is_valid(pdata->gpio_card_detect))
766    if (!gpio_is_valid(pdata->gpio_card_detect))
768767        return 0;
769768
770769    host->card_detect_irq = gpio_to_irq(pdata->gpio_card_detect);
771
772770    if (host->card_detect_irq < 0) {
773771        dev_warn(&pdev->dev, "Failed to get card detect irq\n");
774772        return 0;
775773    }
774
776775    return request_irq(host->card_detect_irq, jz4740_mmc_card_detect_irq,
777776            IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
778777            "MMC card detect", host);
779
780
781    return ret;
782778}
783779
784780static void jz4740_mmc_free_gpios(struct platform_device *pdev)

Archive Download the corresponding diff file



interactive