staging: brcm80211: remove BCMLXSDMMC macro definition
authorArend van Spriel <arend@broadcom.com>
Wed, 29 Jun 2011 23:47:28 +0000 (16:47 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 16:57:19 +0000 (09:57 -0700)
The conditional code depending on BCMLXSDMMC macro definition is
always compiled into the fullmac driver.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/Makefile
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c

index 95d31471b7bb4639b0c187d513be40f0ea8518dd..f76e62aaa0f25f76b4e0c2013c98247bc68889e1 100644 (file)
@@ -16,7 +16,6 @@
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ccflags-y :=                   \
-       -DBCMLXSDMMC            \
        -DBCMPLATFORM_BUS       \
        -DBCMSDIO               \
        -DBRCM_FULLMAC          \
index a2408ec703b6a63131b88fd2c04defa3ed418177..5243f335f9556b052dda418b35c3be053b6ded98 100644 (file)
@@ -121,7 +121,6 @@ bool brcmf_sdio_chipmatch(u16 vendor, u16 device)
 }
 
 #if defined(BCMPLATFORM_BUS)
-#if defined(BCMLXSDMMC)
 /* forward declarations */
 int brcmf_sdio_probe(struct device *dev);
 EXPORT_SYMBOL(brcmf_sdio_probe);
@@ -129,36 +128,15 @@ EXPORT_SYMBOL(brcmf_sdio_probe);
 int brcmf_sdio_remove(struct device *dev);
 EXPORT_SYMBOL(brcmf_sdio_remove);
 
-#else
-/* forward declarations */
-static int __devinit brcmf_sdio_probe(struct device *dev);
-static int __devexit brcmf_sdio_remove(struct device *dev);
-#endif                         /* BCMLXSDMMC */
-
-#ifndef BCMLXSDMMC
-static
-#endif                         /* BCMLXSDMMC */
 int brcmf_sdio_probe(struct device *dev)
 {
        struct bcmsdh_hc *sdhc = NULL;
        unsigned long regs = 0;
        struct brcmf_sdio *sdh = NULL;
-#if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS)
-       struct platform_device *pdev;
-       struct resource *r;
-#endif                         /* BCMLXSDMMC */
        int irq = 0;
        u32 vendevid;
        unsigned long irq_flags = 0;
 
-#if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS)
-       pdev = to_platform_device(dev);
-       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       irq = platform_get_irq(pdev, 0);
-       if (!r || irq == NO_IRQ)
-               return -ENXIO;
-#endif                         /* BCMLXSDMMC */
-
 #if defined(OOB_INTR_ONLY)
 #ifdef HW_OOB
        irq_flags =
@@ -181,19 +159,12 @@ int brcmf_sdio_probe(struct device *dev)
        }
        sdhc->dev = (void *)dev;
 
-#ifdef BCMLXSDMMC
        sdh = brcmf_sdcard_attach((void *)0, (void **)&regs, irq);
        if (!sdh) {
                SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
                goto err;
        }
-#else
-       sdh = brcmf_sdcard_attach((void *)r->start, (void **)&regs, irq);
-       if (!sdh) {
-               SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
-               goto err;
-       }
-#endif                         /* BCMLXSDMMC */
+
        sdhc->sdh = sdh;
        sdhc->oob_irq = irq;
        sdhc->oob_flags = irq_flags;
@@ -229,9 +200,6 @@ err:
        return -ENODEV;
 }
 
-#ifndef BCMLXSDMMC
-static
-#endif                         /* BCMLXSDMMC */
 int brcmf_sdio_remove(struct device *dev)
 {
        struct bcmsdh_hc *sdhc, *prev;
@@ -258,11 +226,6 @@ int brcmf_sdio_remove(struct device *dev)
 
        /* release SDIO Host Controller info */
        kfree(sdhc);
-
-#if !defined(BCMLXSDMMC)
-       dev_set_drvdata(dev, NULL);
-#endif                         /* !defined(BCMLXSDMMC) */
-
        return 0;
 }
 #endif                         /* BCMPLATFORM_BUS */
index a60caea0a8d7df15c604002c0d554a498b7953fe..6fd107280c38fd3899bf43b36c237dffa787ce17 100644 (file)
@@ -38,9 +38,7 @@ int wifi_get_irq_number(unsigned long *irq_flags_ptr);
 
 #if defined(OOB_INTR_ONLY)
 
-#if defined(BCMLXSDMMC)
 extern int sdioh_mmc_irq(int irq);
-#endif                         /* (BCMLXSDMMC)  */
 
 #ifdef CUSTOMER_HW3
 #include <mach/gpio.h>
index 2b1762e0cdb47680a026f42072f49525f48cb3e4..afb840aef673b0859ba25ab9b242aef7a278f0f4 100644 (file)
@@ -923,14 +923,7 @@ static int brcmf_sdbrcm_htclk(dhd_bus_t *bus, bool on, bool pendok)
                DHD_INFO(("CLKCTL: turned ON\n"));
 
 #if defined(DHD_DEBUG)
-               if (bus->alp_only == true) {
-#if !defined(BCMLXSDMMC)
-                       if (!SBSDIO_ALPONLY(clkctl)) {
-                               DHD_ERROR(("%s: HT Clock, when ALP Only\n",
-                                          __func__));
-                       }
-#endif                         /* !defined(BCMLXSDMMC) */
-               } else {
+               if (bus->alp_only != true) {
                        if (SBSDIO_ALPONLY(clkctl)) {
                                DHD_ERROR(("%s: HT Clock should be on.\n",
                                           __func__));