staging: brcm80211: remove function wrapper of getting sb window address
authorFranky Lin <frankyl@broadcom.com>
Thu, 1 Sep 2011 09:17:05 +0000 (11:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:38:51 +0000 (16:38 -0700)
The address stored in sdiodev can be used directly instead of using
the wrapper function brcmf_sdcard_cur_sbwad.

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

index 367277608a4fe9536059bbed75ebf982fed36fc6..e4c785244ea4d2ef5511ca45d6b7744c236983ae 100644 (file)
@@ -476,11 +476,6 @@ int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn)
        return 0;
 }
 
-u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev)
-{
-       return sdiodev->sbwad;
-}
-
 int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
 {
        u32 regs = 0;
index 72e5629b1f9f50e0e75ebbf9bd7e6ceace123832..49914c6da736729187358f05f1f01c74929373c9 100644 (file)
@@ -1336,9 +1336,9 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt,
                        len = roundup(len, ALIGNMENT);
 
        do {
-               ret = brcmf_sdbrcm_send_buf(bus,
-                       brcmf_sdcard_cur_sbwad(bus->sdiodev),
-                       SDIO_FUNC_2, F2SYNC, frame, len, pkt);
+               ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
+                                           SDIO_FUNC_2, F2SYNC, frame,
+                                           len, pkt);
                bus->f2txdata++;
 
                if (ret < 0) {
@@ -1625,10 +1625,8 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)
 
                do {
                        bus->ctrl_frame_stat = false;
-                       ret = brcmf_sdbrcm_send_buf(bus,
-                               brcmf_sdcard_cur_sbwad(bus->sdiodev),
-                               SDIO_FUNC_2,
-                               F2SYNC, frame, len, NULL);
+                       ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
+                                       SDIO_FUNC_2, F2SYNC, frame, len, NULL);
 
                        if (ret < 0) {
                                /* On failure, abort the command and
@@ -1976,11 +1974,9 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
 
 xfer_done:
        /* Return the window to backplane enumeration space for core access */
-       if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev,
-                                          brcmf_sdcard_cur_sbwad(
-                                                       bus->sdiodev)))
+       if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, bus->sdiodev->sbwad))
                brcmf_dbg(ERROR, "FAILED to set window back to 0x%x\n",
-                         brcmf_sdcard_cur_sbwad(bus->sdiodev));
+                         bus->sdiodev->sbwad);
 
        return bcmerror;
 }
@@ -3256,7 +3252,7 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff)
 
        /* Read remainder of frame body into the rxctl buffer */
        sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
-                               brcmf_sdcard_cur_sbwad(bus->sdiodev),
+                               bus->sdiodev->sbwad,
                                SDIO_FUNC_2,
                                F2SYNC, (bus->rxctl + firstread), rdlen,
                                NULL);
@@ -3412,13 +3408,13 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq)
                 */
                if (usechain) {
                        errcode = brcmf_sdcard_recv_buf(bus->sdiodev,
-                                       brcmf_sdcard_cur_sbwad(bus->sdiodev),
+                                       bus->sdiodev->sbwad,
                                        SDIO_FUNC_2,
                                        F2SYNC, (u8 *) pfirst->data, dlen,
                                        pfirst);
                } else if (bus->dataptr) {
                        errcode = brcmf_sdcard_recv_buf(bus->sdiodev,
-                                       brcmf_sdcard_cur_sbwad(bus->sdiodev),
+                                       bus->sdiodev->sbwad,
                                        SDIO_FUNC_2,
                                        F2SYNC, bus->dataptr, dlen,
                                        NULL);
@@ -3756,8 +3752,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
                                rxbuf = (u8 *) (pkt->data);
                                /* Read the entire frame */
                                sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
-                                               brcmf_sdcard_cur_sbwad(
-                                                       bus->sdiodev),
+                                               bus->sdiodev->sbwad,
                                                SDIO_FUNC_2, F2SYNC,
                                                rxbuf, rdlen,
                                                pkt);
@@ -3910,8 +3905,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
                }
 
                /* Read frame header (hardware and software) */
-               sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
-                               brcmf_sdcard_cur_sbwad(bus->sdiodev),
+               sdret = brcmf_sdcard_recv_buf(bus->sdiodev, bus->sdiodev->sbwad,
                                SDIO_FUNC_2, F2SYNC, bus->rxhdr, firstread,
                                NULL);
                bus->f2rxhdrs++;
@@ -4061,8 +4055,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
                PKTALIGN(pkt, rdlen, BRCMF_SDALIGN);
 
                /* Read the remaining frame data */
-               sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
-                               brcmf_sdcard_cur_sbwad(bus->sdiodev),
+               sdret = brcmf_sdcard_recv_buf(bus->sdiodev, bus->sdiodev->sbwad,
                                SDIO_FUNC_2, F2SYNC, ((u8 *) (pkt->data)),
                                rdlen, pkt);
                bus->f2rxdata++;
@@ -4388,8 +4381,7 @@ clkwait:
                (bus->clkstate == CLK_AVAIL)) {
                int ret, i;
 
-               ret = brcmf_sdbrcm_send_buf(bus,
-                       brcmf_sdcard_cur_sbwad(bus->sdiodev),
+               ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
                        SDIO_FUNC_2, F2SYNC, (u8 *) bus->ctrl_frame_buf,
                        (u32) bus->ctrl_frame_len, NULL);
 
index 9c55c4a600f0837258a5652daad21a4f9f44783a..4565aef9cb6713c9050fa9f7eae6db64abc9a519 100644 (file)
@@ -231,9 +231,6 @@ extern void brcmf_sdio_function_cleanup(void);
 extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);
 extern int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev);
 
-/* Function to return current window addr */
-extern u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev);
-
 extern int brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev,
                                          u32 address);