Skip to content

Commit

Permalink
staging: brcm80211: flatten wlc_phy_shared_detach()
Browse files Browse the repository at this point in the history
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 <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Henry Ptasinski authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent aa51bff commit 202a208
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
7 changes: 0 additions & 7 deletions drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 202a208

Please sign in to comment.