Commit f33d7a91 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: remove .init() callback for internal bus interface

The .init() callback was the first function called by the common
bus function brcmf_bus_start(). Given that it is not really
necessary and the bus layer can call it before calling the
brcmf_bus_start() function.
Reviewed-by: default avatarDaniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5a394eba
...@@ -63,7 +63,6 @@ struct brcmf_bus_dcmd { ...@@ -63,7 +63,6 @@ struct brcmf_bus_dcmd {
*/ */
struct brcmf_bus_ops { struct brcmf_bus_ops {
int (*preinit)(struct device *dev); int (*preinit)(struct device *dev);
int (*init)(struct device *dev);
void (*stop)(struct device *dev); void (*stop)(struct device *dev);
int (*txdata)(struct device *dev, struct sk_buff *skb); int (*txdata)(struct device *dev, struct sk_buff *skb);
int (*txctl)(struct device *dev, unsigned char *msg, uint len); int (*txctl)(struct device *dev, unsigned char *msg, uint len);
...@@ -114,11 +113,6 @@ static inline int brcmf_bus_preinit(struct brcmf_bus *bus) ...@@ -114,11 +113,6 @@ static inline int brcmf_bus_preinit(struct brcmf_bus *bus)
return bus->ops->preinit(bus->dev); return bus->ops->preinit(bus->dev);
} }
static inline int brcmf_bus_init(struct brcmf_bus *bus)
{
return bus->ops->init(bus->dev);
}
static inline void brcmf_bus_stop(struct brcmf_bus *bus) static inline void brcmf_bus_stop(struct brcmf_bus *bus)
{ {
bus->ops->stop(bus->dev); bus->ops->stop(bus->dev);
......
...@@ -916,13 +916,6 @@ int brcmf_bus_start(struct device *dev) ...@@ -916,13 +916,6 @@ int brcmf_bus_start(struct device *dev)
brcmf_dbg(TRACE, "\n"); brcmf_dbg(TRACE, "\n");
/* Bring up the bus */
ret = brcmf_bus_init(bus_if);
if (ret != 0) {
brcmf_err("brcmf_sdbrcm_bus_init failed %d\n", ret);
return ret;
}
/* add primary networking interface */ /* add primary networking interface */
ifp = brcmf_add_if(drvr, 0, 0, "wlan%d", NULL); ifp = brcmf_add_if(drvr, 0, 0, "wlan%d", NULL);
if (IS_ERR(ifp)) if (IS_ERR(ifp))
......
...@@ -4020,7 +4020,6 @@ brcmf_sdio_watchdog(unsigned long data) ...@@ -4020,7 +4020,6 @@ brcmf_sdio_watchdog(unsigned long data)
static struct brcmf_bus_ops brcmf_sdio_bus_ops = { static struct brcmf_bus_ops brcmf_sdio_bus_ops = {
.stop = brcmf_sdio_bus_stop, .stop = brcmf_sdio_bus_stop,
.preinit = brcmf_sdio_bus_preinit, .preinit = brcmf_sdio_bus_preinit,
.init = brcmf_sdio_bus_init,
.txdata = brcmf_sdio_bus_txdata, .txdata = brcmf_sdio_bus_txdata,
.txctl = brcmf_sdio_bus_txctl, .txctl = brcmf_sdio_bus_txctl,
.rxctl = brcmf_sdio_bus_rxctl, .rxctl = brcmf_sdio_bus_rxctl,
...@@ -4150,6 +4149,10 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) ...@@ -4150,6 +4149,10 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
brcmf_sdio_debugfs_create(bus); brcmf_sdio_debugfs_create(bus);
brcmf_dbg(INFO, "completed!!\n"); brcmf_dbg(INFO, "completed!!\n");
ret = brcmf_sdio_bus_init(sdiodev->dev);
if (ret)
goto fail;
/* if firmware path present try to download and bring up bus */ /* if firmware path present try to download and bring up bus */
ret = brcmf_bus_start(bus->sdiodev->dev); ret = brcmf_bus_start(bus->sdiodev->dev);
if (ret != 0) { if (ret != 0) {
......
...@@ -1222,7 +1222,6 @@ struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo, ...@@ -1222,7 +1222,6 @@ struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo,
static struct brcmf_bus_ops brcmf_usb_bus_ops = { static struct brcmf_bus_ops brcmf_usb_bus_ops = {
.txdata = brcmf_usb_tx, .txdata = brcmf_usb_tx,
.init = brcmf_usb_up,
.stop = brcmf_usb_down, .stop = brcmf_usb_down,
.txctl = brcmf_usb_tx_ctlpkt, .txctl = brcmf_usb_tx_ctlpkt,
.rxctl = brcmf_usb_rx_ctlpkt, .rxctl = brcmf_usb_rx_ctlpkt,
...@@ -1263,6 +1262,12 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) ...@@ -1263,6 +1262,12 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
goto fail; goto fail;
} }
ret = brcmf_usb_up(dev);
if (ret) {
brcmf_detach(dev);
goto fail;
}
ret = brcmf_bus_start(dev); ret = brcmf_bus_start(dev);
if (ret) { if (ret) {
brcmf_err("dongle is not responding\n"); brcmf_err("dongle is not responding\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment