staging: brcm80211: removed global variable from sdio fullmac
commit1fda276eb1707ec9cef3d00c293d7cb488af7ca6
authorRoland Vossen <rvossen@broadcom.com>
Mon, 8 Aug 2011 13:58:25 +0000 (8 15:58 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:00:02 +0000 (23 13:00 -0700)
treecc67bae26ec5520b450ceb3376c789d8cc9d60a7
parent459f059a44062202717821f50d1edc58bd166eb1
staging: brcm80211: removed global variable from sdio fullmac

Code cleanup. bus->card is assigned in brcmf_sdbrcm_probe (before
brcmf_sdbrcm_probe_attach()). Since w_sdreg32() and r_sdreg32() are called
only after that assignment, they can safely use bus->card. Thus there
is no instance left where brcmf_sdcard_reg_read() or brcmf_sdcard_reg_write()
is called with a NULL parameter, so the mechanism in bcmsdh.c that deals with
a NULL pointer could be deleted.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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_sdio.c