brcmfmac: check bus state for status
authorFranky Lin <frankyl@broadcom.com>
Sat, 28 Apr 2012 01:56:57 +0000 (18:56 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 01:53:54 +0000 (21:53 -0400)
Bus state should be the correct flag for bus status. Use it instead
of result from previous function call for backplane clock switch.

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

index a80b840051a7bccdf9c0dc7540804eea76932c06..ad46f34b582e6be5f517210d11d07a7f402c4964 100644 (file)
@@ -3509,7 +3509,7 @@ static int brcmf_sdbrcm_bus_init(struct device *dev)
                               SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err);
 
        /* If we didn't come up, turn off backplane clock */
-       if (!ret)
+       if (bus_if->state != BRCMF_BUS_DATA)
                brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
 
 exit: