brcmfmac: get rid of some void pointer parameters
authorArend van Spriel <arend@broadcom.com>
Thu, 12 Dec 2013 10:58:56 +0000 (11:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 18 Dec 2013 20:22:42 +0000 (15:22 -0500)
In sdio code a couple of functions use a void pointer as argument
type although it should be struct brcmf_sdio. Changing the functions
to have proper type checking.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h

index 24d69f4eb9a02b424f719fd9f82de30eb693b703..c42d5a005112072836b3009b31dfd6dc4b19dc03 100644 (file)
@@ -3649,10 +3649,8 @@ exit:
        return ret;
 }
 
-void brcmf_sdbrcm_isr(void *arg)
+void brcmf_sdbrcm_isr(struct brcmf_sdio *bus)
 {
-       struct brcmf_sdio *bus = (struct brcmf_sdio *) arg;
-
        brcmf_dbg(TRACE, "Enter\n");
 
        if (!bus) {
@@ -4037,7 +4035,7 @@ static struct brcmf_bus_ops brcmf_sdio_bus_ops = {
        .gettxq = brcmf_sdbrcm_bus_gettxq,
 };
 
-void *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev)
+struct brcmf_sdio *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev)
 {
        int ret;
        struct brcmf_sdio *bus;
@@ -4147,14 +4145,11 @@ fail:
        return NULL;
 }
 
-void brcmf_sdbrcm_disconnect(void *ptr)
+void brcmf_sdbrcm_disconnect(struct brcmf_sdio *bus)
 {
-       struct brcmf_sdio *bus = (struct brcmf_sdio *)ptr;
-
        brcmf_dbg(TRACE, "Enter\n");
 
-       if (bus)
-               brcmf_sdbrcm_release(bus);
+       brcmf_sdbrcm_release(bus);
 
        brcmf_dbg(TRACE, "Disconnected\n");
 }
index d98b4bd1447ba730447f5eeb6bf2b9976fc95490..414aa16a587cc3c2379cf1faa586adfbb261fb10 100644 (file)
@@ -165,7 +165,7 @@ struct brcmf_sdio_dev {
        struct sdio_func *func[SDIO_MAX_FUNCS];
        u8 num_funcs;                   /* Supported funcs on client */
        u32 sbwad;                      /* Save backplane window address */
-       void *bus;
+       struct brcmf_sdio *bus;
        atomic_t suspend;               /* suspend flag */
        wait_queue_head_t request_byte_wait;
        wait_queue_head_t request_word_wait;
@@ -239,10 +239,9 @@ int brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
 /* Issue an abort to the specified function */
 int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn);
 
-void *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev);
-void brcmf_sdbrcm_disconnect(void *ptr);
-void brcmf_sdbrcm_isr(void *arg);
-
+struct brcmf_sdio *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev);
+void brcmf_sdbrcm_disconnect(struct brcmf_sdio *bus);
+void brcmf_sdbrcm_isr(struct brcmf_sdio *bus);
 void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick);
 
 #endif                         /* _BRCM_SDH_H_ */