switch to 2.6.38
[openwrt/staging/chunkeey.git] / target / linux / coldfire / patches / 102-kernel-2.6.38-Fix-SD-MMC-SDIO-over-SPI-driver-bug-when-reinserting.patch
1 From 78f4df7dfe913c68b8329dd84a24325b8f34217b Mon Sep 17 00:00:00 2001
2 From: Wang Huan <wanghuan@zch06.freescale.net>
3 Date: Mon, 8 Aug 2011 09:14:45 +0800
4 Subject: [PATCH] Fix SD/MMC/SDIO over SPI driver bug when reinserting as module
5
6 Signed-off-by: Alison Wang <b18965@freescale.com>
7 ---
8 arch/m68k/coldfire/m5445x/devices.c | 8 ++++++++
9 1 files changed, 8 insertions(+), 0 deletions(-)
10
11 --- a/arch/m68k/coldfire/m5445x/devices.c
12 +++ b/arch/m68k/coldfire/m5445x/devices.c
13 @@ -136,6 +136,13 @@ int mmc_spi_init(struct device *mmc_spi_
14 return 0;
15 }
16
17 +void mmc_spi_exit(struct device *mmc_spi_device, void *irq_privatedata)
18 +{
19 +#if defined(CONFIG_M54451_SD_HW_DETECT)
20 + free_irq(64 + 7, irq_privatedata);
21 +#endif
22 +}
23 +
24 static struct coldfire_dspi_chip dspi_sd_chip_info = {
25 .mode = SPI_MODE_0,
26 .bits_per_word = 8,
27 @@ -154,6 +161,7 @@ static struct coldfire_dspi_chip dspi_sd
28 static struct mmc_spi_platform_data mcf54451_mmc_pdata = {
29 .ocr_mask = MMC_VDD_33_34,
30 .init = mmc_spi_init,
31 + .exit = mmc_spi_exit,
32 };
33 #endif
34