Return-path: Received: from mms2.broadcom.com ([216.31.210.18]:4452 "EHLO mms2.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254Ab1F2Xso (ORCPT ); Wed, 29 Jun 2011 19:48:44 -0400 From: "Franky Lin" To: gregkh@suse.de cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org Subject: [PATCH 111/119] staging: brcm80211: got rid of redundant member 'regs' of struct dhd_bus Date: Wed, 29 Jun 2011 16:48:15 -0700 Message-ID: <1309391303-22741-112-git-send-email-frankyl@broadcom.com> (sfid-20110630_015014_908644_3C996599) In-Reply-To: <1309391303-22741-1-git-send-email-frankyl@broadcom.com> References: <1309391303-22741-1-git-send-email-frankyl@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Roland Vossen Code cleanup. Decreases amd64 compiler warnings. Signed-off-by: Roland Vossen Reviewed-by: Arend van Spriel Reviewed-by: Franky Lin --- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 9ac256e..9bc47a4 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -552,8 +552,6 @@ struct brcmf_bus { uint varsz; /* Size of variables buffer */ u32 sbaddr; /* Current SB window pointer (-1, invalid) */ - /* SDIO core, 32 bit address on the backplane bus: */ - struct sdpcmd_regs *regs; uint sdpcmrev; /* SDIO core revision */ uint armrev; /* CPU core revision */ uint ramrev; /* SOCRAM core revision */ @@ -2725,7 +2723,7 @@ brcmf_sdbrcm_doiovar(struct brcmf_bus *bus, const struct brcmu_iovar *vi, u32 ac sd_ptr = (struct brcmf_sdreg *) params; - addr = (unsigned long)bus->regs + sd_ptr->offset; + addr = bus->ci->buscorebase + sd_ptr->offset; size = sd_ptr->func; int_val = (s32) brcmf_sdcard_reg_read(bus->card, addr, size); @@ -2742,7 +2740,7 @@ brcmf_sdbrcm_doiovar(struct brcmf_bus *bus, const struct brcmu_iovar *vi, u32 ac sd_ptr = (struct brcmf_sdreg *) params; - addr = (unsigned long)bus->regs + sd_ptr->offset; + addr = bus->ci->buscorebase + sd_ptr->offset; size = sd_ptr->func; brcmf_sdcard_reg_write(bus->card, addr, size, sd_ptr->value); @@ -5610,10 +5608,10 @@ brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, void *regsva, bus->ramsize, bus->orig_ramsize)); } - bus->regs = (void *)bus->ci->buscorebase; - /* Set core control so an SDIO reset does a backplane reset */ - OR_REG((u32)&bus->regs->corecontrol, CC_BPRESEN, u32); + OR_REG(bus->ci->buscorebase + offsetof(struct sdpcmd_regs, + corecontrol), + CC_BPRESEN, u32); brcmu_pktq_init(&bus->txq, (PRIOMASK + 1), TXQLEN); -- 1.7.1