aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-03 15:00:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-03 15:00:07 -0500
commite9e67a8b579d9605a3d06f7430dbb40465c97bf1 (patch)
treecd90f29814359440b0f46995216d523ff5d26730 /drivers/mmc/host/sdhci.c
parentad6b646fe55c40ec193240b974561f0a3775d68d (diff)
parent418f19ea17a99421b22a64e101e14b6a16bed66d (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mmc: warn about voltage mismatches mmc_spi: Add support for OpenFirmware bindings pxamci: fix dma_unmap_sg length mmc_block: ensure all sectors that do not have errors are read drivers/mmc: Move a dereference below a NULL test sdhci: handle built-in sdhci with modular leds class mmc: balanc pci_iomap with pci_iounmap mmc_block: print better error messages mmc: Add mmc_vddrange_to_ocrmask() helper function ricoh_mmc: Handle newer models of Ricoh controllers mmc: Add 8-bit bus width support sdhci: activate led support also when module mmc: trivial annotation of 'blocks' pci: use pci_ioremap_bar() in drivers/mmc sdricoh_cs: Add support for Bay Controller devices mmc: at91_mci: reorder timer setup and mmc_add_host() call
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4d010a984bed..6b2d1f99af67 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -30,6 +30,11 @@
30#define DBG(f, x...) \ 30#define DBG(f, x...) \
31 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) 31 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x)
32 32
33#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
34 defined(CONFIG_MMC_SDHCI_MODULE))
35#define SDHCI_USE_LEDS_CLASS
36#endif
37
33static unsigned int debug_quirks = 0; 38static unsigned int debug_quirks = 0;
34 39
35static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *); 40static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *);
@@ -149,7 +154,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host)
149 writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); 154 writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL);
150} 155}
151 156
152#ifdef CONFIG_LEDS_CLASS 157#ifdef SDHCI_USE_LEDS_CLASS
153static void sdhci_led_control(struct led_classdev *led, 158static void sdhci_led_control(struct led_classdev *led,
154 enum led_brightness brightness) 159 enum led_brightness brightness)
155{ 160{
@@ -994,7 +999,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
994 999
995 WARN_ON(host->mrq != NULL); 1000 WARN_ON(host->mrq != NULL);
996 1001
997#ifndef CONFIG_LEDS_CLASS 1002#ifndef SDHCI_USE_LEDS_CLASS
998 sdhci_activate_led(host); 1003 sdhci_activate_led(host);
999#endif 1004#endif
1000 1005
@@ -1201,7 +1206,7 @@ static void sdhci_tasklet_finish(unsigned long param)
1201 host->cmd = NULL; 1206 host->cmd = NULL;
1202 host->data = NULL; 1207 host->data = NULL;
1203 1208
1204#ifndef CONFIG_LEDS_CLASS 1209#ifndef SDHCI_USE_LEDS_CLASS
1205 sdhci_deactivate_led(host); 1210 sdhci_deactivate_led(host);
1206#endif 1211#endif
1207 1212
@@ -1717,7 +1722,7 @@ int sdhci_add_host(struct sdhci_host *host)
1717 sdhci_dumpregs(host); 1722 sdhci_dumpregs(host);
1718#endif 1723#endif
1719 1724
1720#ifdef CONFIG_LEDS_CLASS 1725#ifdef SDHCI_USE_LEDS_CLASS
1721 host->led.name = mmc_hostname(mmc); 1726 host->led.name = mmc_hostname(mmc);
1722 host->led.brightness = LED_OFF; 1727 host->led.brightness = LED_OFF;
1723 host->led.default_trigger = mmc_hostname(mmc); 1728 host->led.default_trigger = mmc_hostname(mmc);
@@ -1739,7 +1744,7 @@ int sdhci_add_host(struct sdhci_host *host)
1739 1744
1740 return 0; 1745 return 0;
1741 1746
1742#ifdef CONFIG_LEDS_CLASS 1747#ifdef SDHCI_USE_LEDS_CLASS
1743reset: 1748reset:
1744 sdhci_reset(host, SDHCI_RESET_ALL); 1749 sdhci_reset(host, SDHCI_RESET_ALL);
1745 free_irq(host->irq, host); 1750 free_irq(host->irq, host);
@@ -1775,7 +1780,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
1775 1780
1776 mmc_remove_host(host->mmc); 1781 mmc_remove_host(host->mmc);
1777 1782
1778#ifdef CONFIG_LEDS_CLASS 1783#ifdef SDHCI_USE_LEDS_CLASS
1779 led_classdev_unregister(&host->led); 1784 led_classdev_unregister(&host->led);
1780#endif 1785#endif
1781 1786