]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
authorJohan Hovold <jhovold@gmail.com>
Wed, 13 Mar 2013 16:11:59 +0000 (17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 02:51:57 +0000 (19:51 -0700)
commit 91cf54feecf815bec0b6a8d6d9dbd0e219f2f2cc upstream.

Fix regression introduced by commit 796211b7953 ("mmc: atmel-mci: add
pdc support and runtime capabilities detection") which removed the need
for CONFIG_MMC_ATMELMCI_DMA but kept the Kconfig-entry as well as the
compile guards around dma_release_channel() in remove(). Consequently,
DMA is always enabled (if supported), but the DMA-channel is not
released on module unload unless the DMA-config option is selected.

Remove the no longer used CONFIG_MMC_ATMELMCI_DMA option completely.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/configs/at91sam9g45_defconfig
arch/avr32/configs/favr-32_defconfig
arch/avr32/configs/merisc_defconfig
drivers/mmc/host/Kconfig
drivers/mmc/host/atmel-mci.c

index 606d48f3b8f81c10370b718d7b2b3475818b9a03..8aab786863dfabac6854bf6ce1c6054074f61a28 100644 (file)
@@ -173,7 +173,6 @@ CONFIG_MMC=y
 # CONFIG_MMC_BLOCK_BOUNCE is not set
 CONFIG_SDIO_UART=m
 CONFIG_MMC_ATMELMCI=y
-CONFIG_MMC_ATMELMCI_DMA=y
 CONFIG_LEDS_ATMEL_PWM=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_TRIGGER_TIMER=y
index 19973b06170c94a5518619a4fb07869c08c1727d..59e4cc9ed81794c6904abff48e45c525037704f1 100644 (file)
@@ -122,7 +122,6 @@ CONFIG_USB_G_SERIAL=m
 CONFIG_USB_CDC_COMPOSITE=m
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
-CONFIG_MMC_ATMELMCI_DMA=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_ATMEL_PWM=m
index 3befab966827bacb4339247637e27d39333a7b1b..65de4431108c837334dc07facfc578fb815d55cd 100644 (file)
@@ -102,7 +102,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
-CONFIG_MMC_ATMELMCI_DMA=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_ATMEL_PWM=y
index 2bc06e7344db5970c754ab6cbf0a849830d8339f..dbdd907423613bcaa53a43ba9bf9fe1626812a27 100644 (file)
@@ -297,16 +297,6 @@ config MMC_ATMELMCI
 
 endchoice
 
-config MMC_ATMELMCI_DMA
-       bool "Atmel MCI DMA support"
-       depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
-       help
-         Say Y here to have the Atmel MCI driver use a DMA engine to
-         do data transfers and thus increase the throughput and
-         reduce the CPU utilization.
-
-         If unsure, say N.
-
 config MMC_IMX
        tristate "Motorola i.MX Multimedia Card Interface support"
        depends on ARCH_MX1
index e94476beca181287b39c3af3a0b542a519bef353..cc867e664b019c4b296272e5d6e3a394f6abbe50 100644 (file)
@@ -2190,10 +2190,8 @@ static int __exit atmci_remove(struct platform_device *pdev)
        atmci_readl(host, ATMCI_SR);
        clk_disable(host->mck);
 
-#ifdef CONFIG_MMC_ATMELMCI_DMA
        if (host->dma.chan)
                dma_release_channel(host->dma.chan);
-#endif
 
        free_irq(platform_get_irq(pdev, 0), host);
        iounmap(host->regs);