[PATCH2 10/12] staging: brcm80211: use local variable for socitype during ai_scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The SOC interface type is only needed to verify that we are accessing
a chip with AMBA AXI interconnect during ai_scan function. Therefor
this can be done with a local variable.

Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
Reviewed-by: Henry Ptasinski <henryp@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmsmac/aiutils.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/aiutils.c b/drivers/staging/brcm80211/brcmsmac/aiutils.c
index 1df8750..21c05aa 100644
--- a/drivers/staging/brcm80211/brcmsmac/aiutils.c
+++ b/drivers/staging/brcm80211/brcmsmac/aiutils.c
@@ -782,6 +782,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
 	u32 w, savewin;
 	chipcregs_t *cc;
 	char *pvars = NULL;
+	uint socitype;
 	uint origidx;
 
 	ASSERT(GOODREGS(regs));
@@ -835,7 +836,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
 	 *   be added here.
 	 */
 	w = R_REG(&cc->chipid);
-	sih->socitype = (w & CID_TYPE_MASK) >> CID_TYPE_SHIFT;
+	socitype = (w & CID_TYPE_MASK) >> CID_TYPE_SHIFT;
 	/* Might as wll fill in chip id rev & pkg */
 	sih->chip = w & CID_ID_MASK;
 	sih->chiprev = (w & CID_REV_MASK) >> CID_REV_SHIFT;
@@ -844,7 +845,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
 	sih->issim = IS_SIM(sih->chippkg);
 
 	/* scan for cores */
-	if (sii->pub.socitype == SOCI_AI) {
+	if (socitype == SOCI_AI) {
 		SI_MSG(("Found chip type AI (0x%08x)\n", w));
 		/* pass chipc address instead of original core base */
 		ai_scan(&sii->pub, (void *)cc, devid);
-- 
1.7.1


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux