staging: brcm80211: remove struct brcmf_sdioh_driver from brcmfmac
authorFranky Lin <frankyl@broadcom.com>
Mon, 8 Aug 2011 13:58:51 +0000 (15:58 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:00:08 +0000 (13:00 -0700)
brcmf_sdioh_driver is a legacy bus driver interface we dont need
any more.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/bcmsdh.c
drivers/staging/brcm80211/brcmfmac/dhd_bus.h
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/sdio_host.h

index 0cd449d332e661c8d7f9c4dfd1e40aa934f6b44a..82d9d2cc69c23430f3bb4761857915d8e8ac589e 100644 (file)
@@ -50,9 +50,6 @@ struct brcmf_sdio_card {
        u32 sbwad;              /* Save backplane window address */
 };
 
-/* driver info, initialized when brcmf_sdio_register is called */
-static struct brcmf_sdioh_driver drvinfo = { NULL, NULL };
-
 /* Module parameters specific to each host-controller driver */
 
 module_param(sd_f2_blocksize, int, 0);
@@ -443,7 +440,7 @@ int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
        vendevid = brcmf_sdcard_query_device(sdiodev->card);
 
        /* try to attach to the target device */
-       sdiodev->bus = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
+       sdiodev->bus = brcmf_sdbrcm_probe((vendevid >> 16), (vendevid & 0xFFFF),
                                  0, 0, 0, 0, regs, sdiodev->card);
        if (!sdiodev->bus) {
                BRCMF_ERROR(("%s: device attach failed\n", __func__));
@@ -462,7 +459,7 @@ EXPORT_SYMBOL(brcmf_sdio_probe);
 int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev)
 {
        if (sdiodev->bus) {
-               drvinfo.detach(sdiodev->bus);
+               brcmf_sdbrcm_disconnect(sdiodev->bus);
                sdiodev->bus = NULL;
        }
 
@@ -477,10 +474,8 @@ int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev)
 }
 EXPORT_SYMBOL(brcmf_sdio_remove);
 
-int brcmf_sdio_register(struct brcmf_sdioh_driver *driver)
+int brcmf_sdio_register(void)
 {
-       drvinfo = *driver;
-
        return brcmf_sdio_function_init();
 }
 
index 653cf0daa0eb363005c14d9b64a74283d6ffa82a..0fb32509ceee5f689a31e0c4df9e8a9db5535504 100644 (file)
@@ -75,4 +75,8 @@ extern void brcmf_bus_clearcounts(struct brcmf_pub *drvr);
 
 extern void brcmf_sdbrcm_wd_timer(struct brcmf_bus *bus, uint wdtick);
 
+extern void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
+                               u16 slot, u16 func, uint bustype, u32 regsva,
+                               void *card);
+extern void brcmf_sdbrcm_disconnect(void *ptr);
 #endif                         /* _BRCMF_BUS_H_ */
index 6c96f7774818bc0e1c9042076973186fad134851..1b847678c47dde6b8e7ee7c2e4bbd2819de44a6f 100644 (file)
@@ -962,7 +962,6 @@ static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter);
 
 static void brcmf_sdbrcm_release(struct brcmf_bus *bus);
 static void brcmf_sdbrcm_release_malloc(struct brcmf_bus *bus);
-static void brcmf_sdbrcm_disconnect(void *ptr);
 static bool brcmf_sdbrcm_chipmatch(u16 chipid);
 static bool brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card,
                                      u32 regsva, u16 devid);
@@ -5431,7 +5430,7 @@ static bool brcmf_sdbrcm_chipmatch(u16 chipid)
        return false;
 }
 
-static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
+void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
                           u16 slot, u16 func, uint bustype, u32 regsva,
                           void *card)
 {
@@ -5889,7 +5888,7 @@ static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus)
        BRCMF_TRACE(("%s: Disconnected\n", __func__));
 }
 
-static void brcmf_sdbrcm_disconnect(void *ptr)
+void brcmf_sdbrcm_disconnect(void *ptr)
 {
        struct brcmf_bus *bus = (struct brcmf_bus *)ptr;
 
@@ -5901,16 +5900,6 @@ static void brcmf_sdbrcm_disconnect(void *ptr)
        BRCMF_TRACE(("%s: Disconnected\n", __func__));
 }
 
-/* Register/Unregister functions are called by the main DHD entry
- * point (e.g. module insertion) to link with the bus driver, in
- * order to look for or await the device.
- */
-
-static struct brcmf_sdioh_driver brcmf_sdio = {
-       brcmf_sdbrcm_probe,
-       brcmf_sdbrcm_disconnect
-};
-
 int brcmf_bus_register(void)
 {
        BRCMF_TRACE(("%s: Enter\n", __func__));
@@ -5930,7 +5919,7 @@ int brcmf_bus_register(void)
                return -EINVAL;
        } while (0);
 
-       return brcmf_sdio_register(&brcmf_sdio);
+       return brcmf_sdio_register();
 }
 
 void brcmf_bus_unregister(void)
index f4e2329fd6b52d26455282c226c65bcb27dded75..3d6c2613432fd460a1a44bc6ba200c0fffd9ac7d 100644 (file)
@@ -278,20 +278,11 @@ extern int brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,
 
 /* helper functions */
 
-/* callback functions */
-struct brcmf_sdioh_driver {
-       /* attach to device */
-       void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
-                        u16 func, uint bustype, u32 regsva, void *param);
-       /* detach from device */
-       void (*detach) (void *ch);
-};
-
 struct sdioh_info;
 
 /* platform specific/high level functions */
 extern int brcmf_sdio_function_init(void);
-extern int brcmf_sdio_register(struct brcmf_sdioh_driver *driver);
+extern int brcmf_sdio_register(void);
 extern void brcmf_sdio_unregister(void);
 extern void brcmf_sdio_function_cleanup(void);
 extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);