Code cleanup. Replaced proprietary function by dev_err(). Signed-off-by: Roland Vossen <rvossen@xxxxxxxxxxxx> Reviewed-by: Arend van Spriel <arend@xxxxxxxxxxxx> --- drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 160 ++++++++++++++----------- 1 files changed, 89 insertions(+), 71 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c index 53a81fa..99884bd 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c @@ -200,6 +200,8 @@ static void wlc_bmac_update_slot_timing(struct wlc_hw_info *wlc_hw, static void WLBANDINITFN(wlc_ucode_bsinit) (struct wlc_hw_info *wlc_hw) { + struct device *dev = wlc_hw->wlc->dev; + /* init microcode host flags */ wlc_write_mhf(wlc_hw, wlc_hw->band->mhfs); @@ -208,20 +210,20 @@ static void WLBANDINITFN(wlc_ucode_bsinit) (struct wlc_hw_info *wlc_hw) if (WLCISNPHY(wlc_hw->band)) { wlc_write_inits(wlc_hw, d11n0bsinitvals16); } else { - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(dev, "%s: wl%d: unsupported phy in corerev %d" + "\n", __func__, wlc_hw->unit, wlc_hw->corerev); } } else { if (D11REV_IS(wlc_hw->corerev, 24)) { if (WLCISLCNPHY(wlc_hw->band)) { wlc_write_inits(wlc_hw, d11lcn0bsinitvals24); } else - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, + dev_err(dev, "%s: wl%d: unsupported phy in core" + "rev %d\n", __func__, wlc_hw->unit, wlc_hw->corerev); } else { - WL_ERROR("%s: wl%d: unsupported corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(dev, "%s: wl%d: unsupported corerev %d\n", + __func__, wlc_hw->unit, wlc_hw->corerev); } } } @@ -320,9 +322,10 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded) struct wlc_hw_info *wlc_hw = wlc->hw; d11regs_t *regs = wlc_hw->regs; bool fatal = false; + struct device *dev = wlc->dev; if (DEVICEREMOVED(wlc)) { - WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__); + dev_err(dev, "wl%d: %s: dead chip\n", wlc_hw->unit, __func__); wl_down(wlc->wl); return false; } @@ -355,7 +358,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded) if (wlc_bmac_txstatus(wlc->hw, bounded, &fatal)) wlc->macintstatus |= MI_TFS; if (fatal) { - WL_ERROR("MI_TFS: fatal\n"); + dev_err(dev, "MI_TFS: fatal\n"); goto fatal; } } @@ -386,7 +389,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded) /* TX FIFO suspend/flush completion */ if (macintstatus & MI_TXSTOP) { if (wlc_bmac_tx_fifo_suspended(wlc_hw, TX_DATA_FIFO)) { - /* WL_ERROR("dpc: fifo_suspend_comlete\n"); */ + /* dev_err(dev, "dpc: fifo_suspend_comlete\n"); */ } } @@ -396,8 +399,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded) } if (macintstatus & MI_GP0) { - WL_ERROR("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n", - wlc_hw->unit, wlc_hw->now); + dev_err(dev, "wl%d: PSM microcode watchdog fired at %d " + "(seconds). Resetting.\n", wlc_hw->unit, wlc_hw->now); printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n", __func__, wlc_hw->sih->chip, @@ -522,6 +525,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) struct wlc_hw_info *wlc_hw = wlc->hw; uint unit = wlc_hw->unit; wlc_tunables_t *tune = wlc->pub->tunables; + struct device *dev = wlc->dev; /* name and offsets for dma_attach */ snprintf(name, sizeof(name), "wl%d", unit); @@ -537,8 +541,8 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) dma_addrwidth(wlc_hw->sih, DMAREG(wlc_hw, DMA_TX, 0)); if (!wl_alloc_dma_resources(wlc_hw->wlc->wl, addrwidth)) { - WL_ERROR("wl%d: wlc_attach: alloc_dma_resources failed\n", - unit); + dev_err(dev, "wl%d: wlc_attach: alloc_dma_resources " + "failed\n", unit); return false; } @@ -590,7 +594,8 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) /* Cleaner to leave this as if with AP defined */ if (dma_attach_err) { - WL_ERROR("wl%d: wlc_attach: dma_attach failed\n", unit); + dev_err(dev, "wl%d: wlc_attach: dma_attach failed\n", + unit); return false; } @@ -637,6 +642,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, uint j; bool wme = false; shared_phy_params_t sha_params; + struct device *dev = wlc->dev; WL_TRACE("wl%d: wlc_bmac_attach: vendor 0x%x device 0x%x\n", unit, vendor, device); @@ -661,7 +667,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, wlc_hw->sih = ai_attach((uint) device, regsva, bustype, btparam, &wlc_hw->vars, &wlc_hw->vars_size); if (wlc_hw->sih == NULL) { - WL_ERROR("wl%d: wlc_bmac_attach: si_attach failed\n", unit); + dev_err(dev, "wl%d: wlc_bmac_attach: si_attach failed\n", + unit); err = 11; goto fail; } @@ -681,21 +688,22 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, var = getvar(vars, "vendid"); if (var) { vendor = (u16) simple_strtoul(var, NULL, 0); - WL_ERROR("Overriding vendor id = 0x%x\n", vendor); + dev_err(dev, "Overriding vendor id = 0x%x\n", vendor); } var = getvar(vars, "devid"); if (var) { u16 devid = (u16) simple_strtoul(var, NULL, 0); if (devid != 0xffff) { device = devid; - WL_ERROR("Overriding device id = 0x%x\n", - device); + dev_err(dev, "Overriding device id = 0x%x\n", + device); } } /* verify again the device is supported */ if (!wlc_chipmatch(vendor, device)) { - WL_ERROR("wl%d: wlc_bmac_attach: Unsupported vendor/device (0x%x/0x%x)\n", + dev_err(dev, "wl%d: wlc_bmac_attach: Unsupported " + "vendor/device (0x%x/0x%x)\n", unit, vendor, device); err = 12; goto fail; @@ -731,8 +739,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, wlc_bmac_corereset(wlc_hw, WLC_USE_COREFLAGS); if (!wlc_bmac_validate_chip_access(wlc_hw)) { - WL_ERROR("wl%d: wlc_bmac_attach: validate_chip_access failed\n", - unit); + dev_err(dev, "wl%d: wlc_bmac_attach: validate_chip_access " + "failed\n", unit); err = 14; goto fail; } @@ -744,7 +752,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, j = BOARDREV_PROMOTED; wlc_hw->boardrev = (u16) j; if (!wlc_validboardtype(wlc_hw)) { - WL_ERROR("wl%d: wlc_bmac_attach: Unsupported Broadcom board type (0x%x)" " or revision level (0x%x)\n", + dev_err(dev, "wl%d: wlc_bmac_attach: Unsupported Broadcom " + "board type (0x%x)" " or revision level (0x%x)\n", unit, wlc_hw->sih->boardtype, wlc_hw->boardrev); err = 15; goto fail; @@ -786,8 +795,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, wlc_hw->physhim = wlc_phy_shim_attach(wlc_hw, wlc->wl, wlc); if (wlc_hw->physhim == NULL) { - WL_ERROR("wl%d: wlc_bmac_attach: wlc_phy_shim_attach failed\n", - unit); + dev_err(dev, "wl%d: wlc_bmac_attach: wlc_phy_shim_attach " + "failed\n", unit); err = 25; goto fail; } @@ -852,8 +861,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, (void *)regs, wlc_bmac_bandtype(wlc_hw), vars, wlc->dev); if (wlc_hw->band->pi == NULL) { - WL_ERROR("wl%d: wlc_bmac_attach: wlc_phy_attach failed\n", - unit); + dev_err(dev, "wl%d: wlc_bmac_attach: wlc_phy_attach " + "failed\n", unit); err = 17; goto fail; } @@ -883,8 +892,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, goto bad_phy; } else { bad_phy: - WL_ERROR("wl%d: wlc_bmac_attach: unsupported phy type/rev (%d/%d)\n", - unit, + dev_err(dev, "wl%d: wlc_bmac_attach: unsupported phy " + "type/rev (%d/%d)\n", unit, wlc_hw->band->phytype, wlc_hw->band->phyrev); err = 18; goto fail; @@ -940,15 +949,16 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, /* init etheraddr state variables */ macaddr = wlc_get_macaddr(wlc_hw); if (macaddr == NULL) { - WL_ERROR("wl%d: wlc_bmac_attach: macaddr not found\n", unit); + dev_err(dev, "wl%d: wlc_bmac_attach: macaddr not found\n", + unit); err = 21; goto fail; } bcm_ether_atoe(macaddr, wlc_hw->etheraddr); if (is_broadcast_ether_addr(wlc_hw->etheraddr) || is_zero_ether_addr(wlc_hw->etheraddr)) { - WL_ERROR("wl%d: wlc_bmac_attach: bad macaddr %s\n", - unit, macaddr); + dev_err(dev, "wl%d: wlc_bmac_attach: bad macaddr %s\n", + unit, macaddr); err = 22; goto fail; } @@ -960,7 +970,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit, return err; fail: - WL_ERROR("wl%d: wlc_bmac_attach: failed with err %d\n", unit, err); + dev_err(dev, "wl%d: wlc_bmac_attach: failed with err %d\n", unit, err); return err; } @@ -1999,7 +2009,8 @@ static bool wlc_isgoodchip(struct wlc_hw_info *wlc_hw) /* reject unsupported corerev */ if (!VALID_COREREV(wlc_hw->corerev)) { - WL_ERROR("unsupported core rev %d\n", wlc_hw->corerev); + dev_err(wlc_hw->wlc->dev, "unsupported core rev %d\n", + wlc_hw->corerev); return false; } @@ -2047,8 +2058,8 @@ static char *wlc_get_macaddr(struct wlc_hw_info *wlc_hw) macaddr = getvar(wlc_hw->vars, varname); if (macaddr == NULL) { - WL_ERROR("wl%d: wlc_get_macaddr: macaddr getvar(%s) not found\n", - wlc_hw->unit, varname); + dev_err(wlc_hw->wlc->dev, "wl%d: wlc_get_macaddr: macaddr " + "getvar(%s) not found\n", wlc_hw->unit, varname); } return macaddr; @@ -2182,14 +2193,16 @@ void wlc_bmac_corereset(struct wlc_hw_info *wlc_hw, u32 flags) if (ai_iscoreup(wlc_hw->sih)) { for (i = 0; i < NFIFO; i++) if ((wlc_hw->di[i]) && (!dma_txreset(wlc_hw->di[i]))) { - WL_ERROR("wl%d: %s: dma_txreset[%d]: cannot stop dma\n", + dev_err(wlc_hw->wlc->dev, "wl%d: %s: " + "dma_txreset[%d]: cannot stop dma\n", wlc_hw->unit, __func__, i); } if ((wlc_hw->di[RX_FIFO]) && (!wlc_dma_rxreset(wlc_hw, RX_FIFO))) { - WL_ERROR("wl%d: %s: dma_rxreset[%d]: cannot stop dma\n", - wlc_hw->unit, __func__, RX_FIFO); + dev_err(wlc_hw->wlc->dev, "wl%d: %s: dma_rxreset[%d]: " + "cannot stop dma\n", + wlc_hw->unit, __func__, RX_FIFO); } } /* if noreset, just stop the psm and return */ @@ -2305,6 +2318,7 @@ static void wlc_coreinit(struct wlc_info *wlc) bool fifosz_fixup = false; int err = 0; u16 buf[NFIFO]; + struct device *dev = wlc->dev; regs = wlc_hw->regs; @@ -2328,8 +2342,8 @@ static void wlc_coreinit(struct wlc_info *wlc) SPINWAIT(((R_REG(®s->macintstatus) & MI_MACSSPNDD) == 0), 1000 * 1000); if ((R_REG(®s->macintstatus) & MI_MACSSPNDD) == 0) - WL_ERROR("wl%d: wlc_coreinit: ucode did not self-suspend!\n", - wlc_hw->unit); + dev_err(dev, "wl%d: wlc_coreinit: ucode did not self-suspend!" + "\n", wlc_hw->unit); wlc_gpio_init(wlc); @@ -2339,18 +2353,18 @@ static void wlc_coreinit(struct wlc_info *wlc) if (WLCISNPHY(wlc_hw->band)) wlc_write_inits(wlc_hw, d11n0initvals16); else - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(dev, "%s: wl%d: unsupported phy in corerev %d" + "\n", __func__, wlc_hw->unit, wlc_hw->corerev); } else if (D11REV_IS(wlc_hw->corerev, 24)) { if (WLCISLCNPHY(wlc_hw->band)) { wlc_write_inits(wlc_hw, d11lcn0initvals24); } else { - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(dev, "%s: wl%d: unsupported phy in corerev %d" + "\n", __func__, wlc_hw->unit, wlc_hw->corerev); } } else { - WL_ERROR("%s: wl%d: unsupported corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(dev, "%s: wl%d: unsupported corerev %d\n", + __func__, wlc_hw->unit, wlc_hw->corerev); } /* For old ucode, txfifo sizes needs to be modified(increased) */ @@ -2392,8 +2406,9 @@ static void wlc_coreinit(struct wlc_info *wlc) err = -1; } if (err != 0) { - WL_ERROR("wlc_coreinit: txfifo mismatch: ucode size %d driver size %d index %d\n", - buf[i], wlc_hw->xmtfifo_sz[i], i); + dev_err(dev, "wlc_coreinit: txfifo mismatch: ucode size %d " + "driver size %d index %d\n", buf[i], + wlc_hw->xmtfifo_sz[i], i); ASSERT(0); } @@ -2588,16 +2603,16 @@ static void wlc_ucode_download(struct wlc_hw_info *wlc_hw) bcm43xx_16_mimosz); wlc_hw->ucode_loaded = true; } else - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(wlc->dev, "%s: wl%d: unsupported phy in corerev %d\n", + __func__, wlc_hw->unit, wlc_hw->corerev); } else if (D11REV_IS(wlc_hw->corerev, 24)) { if (WLCISLCNPHY(wlc_hw->band)) { wlc_ucode_write(wlc_hw, bcm43xx_24_lcn, bcm43xx_24_lcnsz); wlc_hw->ucode_loaded = true; } else { - WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n", - __func__, wlc_hw->unit, wlc_hw->corerev); + dev_err(wlc->dev, "%s: wl%d: unsupported phy in corerev %d\n", + __func__, wlc_hw->unit, wlc_hw->corerev); } } } @@ -2690,6 +2705,7 @@ void wlc_bmac_fifoerrors(struct wlc_hw_info *wlc_hw) uint unit; uint intstatus, idx; d11regs_t *regs = wlc_hw->regs; + struct device *dev = wlc_hw->wlc->dev; unit = wlc_hw->unit; @@ -2704,40 +2720,40 @@ void wlc_bmac_fifoerrors(struct wlc_hw_info *wlc_hw) unit, idx, intstatus); if (intstatus & I_RO) { - WL_ERROR("wl%d: fifo %d: receive fifo overflow\n", + dev_err(dev, "wl%d: fifo %d: receive fifo overflow\n", unit, idx); wlc_hw->wlc->pub->_cnt->rxoflo++; fatal = true; } if (intstatus & I_PC) { - WL_ERROR("wl%d: fifo %d: descriptor error\n", + dev_err(dev, "wl%d: fifo %d: descriptor error\n", unit, idx); wlc_hw->wlc->pub->_cnt->dmade++; fatal = true; } if (intstatus & I_PD) { - WL_ERROR("wl%d: fifo %d: data error\n", unit, idx); + dev_err(dev, "wl%d: fifo %d: data error\n", unit, idx); wlc_hw->wlc->pub->_cnt->dmada++; fatal = true; } if (intstatus & I_DE) { - WL_ERROR("wl%d: fifo %d: descriptor protocol error\n", + dev_err(dev, "wl%d: fifo %d: descriptor protocol error\n", unit, idx); wlc_hw->wlc->pub->_cnt->dmape++; fatal = true; } if (intstatus & I_RU) { - WL_ERROR("wl%d: fifo %d: receive descriptor underflow\n", + dev_err(dev, "wl%d: fifo %d: receive descriptor underflow\n", idx, unit); wlc_hw->wlc->pub->_cnt->rxuflo[idx]++; } if (intstatus & I_XU) { - WL_ERROR("wl%d: fifo %d: transmit fifo underflow\n", + dev_err(dev, "wl%d: fifo %d: transmit fifo underflow\n", idx, unit); wlc_hw->wlc->pub->_cnt->txuflo++; fatal = true; @@ -3038,7 +3054,7 @@ bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc) macintstatus = wlc_intstatus(wlc, true); if (macintstatus == 0xffffffff) - WL_ERROR("DEVICEREMOVED detected in the ISR code path\n"); + dev_err(wlc->dev, "DEVICEREMOVED detected in the ISR code path\n"); /* it is not for us */ if (macintstatus == 0) @@ -3096,7 +3112,7 @@ wlc_bmac_txstatus(struct wlc_hw_info *wlc_hw, bool bound, bool *fatal) && (s1 = R_REG(®s->frmtxstatus)) & TXS_V) { if (s1 == 0xffffffff) { - WL_ERROR("wl%d: %s: dead chip\n", + dev_err(wlc->dev, "wl%d: %s: dead chip\n", wlc_hw->unit, __func__); ASSERT(s1 != 0xffffffff); return morepending; @@ -3134,6 +3150,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc) struct wlc_hw_info *wlc_hw = wlc->hw; d11regs_t *regs = wlc_hw->regs; u32 mc, mi; + struct device *dev = wlc->dev; WL_TRACE("wl%d: wlc_suspend_mac_and_wait: bandunit %d\n", wlc_hw->unit, wlc_hw->band->bandunit); @@ -3151,7 +3168,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc) mc = R_REG(®s->maccontrol); if (mc == 0xffffffff) { - WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__); + dev_err(dev, "wl%d: %s: dead chip\n", wlc_hw->unit, __func__); wl_down(wlc->wl); return; } @@ -3161,7 +3178,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc) mi = R_REG(®s->macintstatus); if (mi == 0xffffffff) { - WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__); + dev_err(dev, "wl%d: %s: dead chip\n", wlc_hw->unit, __func__); wl_down(wlc->wl); return; } @@ -3173,9 +3190,9 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc) WLC_MAX_MAC_SUSPEND); if (!(R_REG(®s->macintstatus) & MI_MACSSPNDD)) { - WL_ERROR("wl%d: wlc_suspend_mac_and_wait: waited %d uS and MI_MACSSPNDD is still not on.\n", + dev_err(dev, "wl%d: wlc_suspend_mac_and_wait: waited %d uS and MI_MACSSPNDD is still not on.\n", wlc_hw->unit, WLC_MAX_MAC_SUSPEND); - WL_ERROR("wl%d: psmdebug 0x%08x, phydebug 0x%08x, psm_brc 0x%04x\n", + dev_err(dev, "wl%d: psmdebug 0x%08x, phydebug 0x%08x, psm_brc 0x%04x\n", wlc_hw->unit, R_REG(®s->psmdebug), R_REG(®s->phydebug), @@ -3184,7 +3201,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc) mc = R_REG(®s->maccontrol); if (mc == 0xffffffff) { - WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__); + dev_err(dev, "wl%d: %s: dead chip\n", wlc_hw->unit, __func__); wl_down(wlc->wl); return; } @@ -3321,6 +3338,7 @@ static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw) { d11regs_t *regs; u32 w, val; + struct device *dev = wlc_hw->wlc->dev; WL_TRACE("wl%d: validate_chip_access\n", wlc_hw->unit); @@ -3341,7 +3359,7 @@ static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw) (void)R_REG(®s->objaddr); val = R_REG(®s->objdata); if (val != (u32) 0xaa5555aa) { - WL_ERROR("wl%d: validate_chip_access: SHM = 0x%x, expected 0xaa5555aa\n", + dev_err(dev, "wl%d: validate_chip_access: SHM = 0x%x, expected 0xaa5555aa\n", wlc_hw->unit, val); return false; } @@ -3354,7 +3372,7 @@ static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw) (void)R_REG(®s->objaddr); val = R_REG(®s->objdata); if (val != (u32) 0x55aaaa55) { - WL_ERROR("wl%d: validate_chip_access: SHM = 0x%x, expected 0x55aaaa55\n", + dev_err(dev, "wl%d: validate_chip_access: SHM = 0x%x, expected 0x55aaaa55\n", wlc_hw->unit, val); return false; } @@ -3369,7 +3387,7 @@ static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw) w = R_REG(®s->maccontrol); if ((w != (MCTL_IHR_EN | MCTL_WAKE)) && (w != (MCTL_IHR_EN | MCTL_GMODE | MCTL_WAKE))) { - WL_ERROR("wl%d: validate_chip_access: maccontrol = 0x%x, expected 0x%x or 0x%x\n", + dev_err(dev, "wl%d: validate_chip_access: maccontrol = 0x%x, expected 0x%x or 0x%x\n", wlc_hw->unit, w, (MCTL_IHR_EN | MCTL_WAKE), (MCTL_IHR_EN | MCTL_GMODE | MCTL_WAKE)); @@ -3403,8 +3421,8 @@ void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on) tmp = R_REG(®s->clk_ctl_st); if ((tmp & (CCS_ERSRC_AVAIL_HT)) != (CCS_ERSRC_AVAIL_HT)) { - WL_ERROR("%s: turn on PHY PLL failed\n", - __func__); + dev_err(wlc_hw->wlc->dev, "%s: turn on PHY PLL failed\n", + __func__); ASSERT(0); } } else { @@ -3421,7 +3439,7 @@ void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on) (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) != (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) { - WL_ERROR("%s: turn on PHY PLL failed\n", + dev_err(wlc_hw->wlc->dev, "%s: turn on PHY PLL failed\n", __func__); ASSERT(0); } -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel