From: Henry Ptasinski Date: Wed, 29 Jun 2011 23:46:54 +0000 (-0700) Subject: staging: brcm80211: flatten wlc_phy_shared_detach() X-Git-Tag: next-20110726~5^2~321 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=202a208bd2888b6b72355bb1849f641606da928f;p=karo-tx-linux.git staging: brcm80211: flatten wlc_phy_shared_detach() wlc_phy_shared_detach() is an unnecessary level of indirection to just call kfree(), so replace the function with kfree(). Signed-off-by: Henry Ptasinski Reviewed-by: Roland Vossen Reviewed-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmsmac/bmac.c b/drivers/staging/brcm80211/brcmsmac/bmac.c index 90d1b327f029..f44f581068a4 100644 --- a/drivers/staging/brcm80211/brcmsmac/bmac.c +++ b/drivers/staging/brcm80211/brcmsmac/bmac.c @@ -982,7 +982,7 @@ int brcms_b_detach(struct brcms_c_info *wlc) } /* Free shared phy state */ - wlc_phy_shared_detach(wlc_hw->phy_sh); + kfree(wlc_hw->phy_sh); wlc_phy_shim_detach(wlc_hw->physhim); diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c index a15c14581304..b527e5f0fac0 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c @@ -506,13 +506,6 @@ shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp) return sh; } -void wlc_phy_shared_detach(shared_phy_t *phy_sh) -{ - if (phy_sh) { - kfree(phy_sh); - } -} - wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars, struct wiphy *wiphy) { diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h index 3c125c3f476f..0ea337be846b 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h @@ -177,7 +177,6 @@ struct shared_phy_params { extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp); -extern void wlc_phy_shared_detach(shared_phy_t *phy_sh); extern wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars, struct wiphy *wiphy); extern void wlc_phy_detach(wlc_phy_t *ppi);