Message ID | 20170117192325.14528-2-zajec5@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
On 17-1-2017 20:23, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Driver used to call brcmf_bus_detach only from one place and it already > contained a check for drvr not being NULL. We can get rid of this extra > function, call brcmf_bus_stop directly and simplify the code. > There also isn't brcmf_bus_attach function which one could expect so it > looks more consistent this way. Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c > index adf8eb1..122c79d 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c > @@ -1075,16 +1075,6 @@ void brcmf_bus_add_txhdrlen(struct device *dev, uint len) > } > } > > -static void brcmf_bus_detach(struct brcmf_pub *drvr) > -{ > - brcmf_dbg(TRACE, "Enter\n"); > - > - if (drvr) { > - /* Stop the bus module */ > - brcmf_bus_stop(drvr->bus_if); > - } > -} > - > void brcmf_dev_reset(struct device *dev) > { > struct brcmf_bus *bus_if = dev_get_drvdata(dev); > @@ -1131,7 +1121,7 @@ void brcmf_detach(struct device *dev) > > brcmf_fws_deinit(drvr); > > - brcmf_bus_detach(drvr); > + brcmf_bus_stop(drvr->bus_if); > > brcmf_proto_detach(drvr); > >
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index adf8eb1..122c79d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -1075,16 +1075,6 @@ void brcmf_bus_add_txhdrlen(struct device *dev, uint len) } } -static void brcmf_bus_detach(struct brcmf_pub *drvr) -{ - brcmf_dbg(TRACE, "Enter\n"); - - if (drvr) { - /* Stop the bus module */ - brcmf_bus_stop(drvr->bus_if); - } -} - void brcmf_dev_reset(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); @@ -1131,7 +1121,7 @@ void brcmf_detach(struct device *dev) brcmf_fws_deinit(drvr); - brcmf_bus_detach(drvr); + brcmf_bus_stop(drvr->bus_if); brcmf_proto_detach(drvr);