Commit 847794a1 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove gpio parameter from wilc_netdev_init()

Instead of passing the gpio as parameter to wilc_netdev_init() now
setting its value after finishing wilc_netdev_init() call. Avoided
passing of extra parameter to wilc_netdev_init().
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9005feae
...@@ -1053,7 +1053,7 @@ static const struct net_device_ops wilc_netdev_ops = { ...@@ -1053,7 +1053,7 @@ static const struct net_device_ops wilc_netdev_ops = {
}; };
int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
int gpio, const struct wilc_hif_func *ops) const struct wilc_hif_func *ops)
{ {
int i, ret; int i, ret;
struct wilc_vif *vif; struct wilc_vif *vif;
...@@ -1066,7 +1066,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, ...@@ -1066,7 +1066,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
*wilc = wl; *wilc = wl;
wl->io_type = io_type; wl->io_type = io_type;
wl->gpio = gpio;
wl->hif_func = ops; wl->hif_func = ops;
INIT_LIST_HEAD(&wl->txq_head.list); INIT_LIST_HEAD(&wl->txq_head.list);
INIT_LIST_HEAD(&wl->rxq_head.list); INIT_LIST_HEAD(&wl->rxq_head.list);
......
...@@ -118,14 +118,14 @@ static int linux_sdio_probe(struct sdio_func *func, ...@@ -118,14 +118,14 @@ static int linux_sdio_probe(struct sdio_func *func,
} }
dev_dbg(&func->dev, "Initializing netdev\n"); dev_dbg(&func->dev, "Initializing netdev\n");
ret = wilc_netdev_init(&wilc, &func->dev, HIF_SDIO, gpio, ret = wilc_netdev_init(&wilc, &func->dev, HIF_SDIO, &wilc_hif_sdio);
&wilc_hif_sdio);
if (ret) { if (ret) {
dev_err(&func->dev, "Couldn't initialize netdev\n"); dev_err(&func->dev, "Couldn't initialize netdev\n");
return ret; return ret;
} }
sdio_set_drvdata(func, wilc); sdio_set_drvdata(func, wilc);
wilc->dev = &func->dev; wilc->dev = &func->dev;
wilc->gpio = gpio;
dev_info(&func->dev, "Driver Initializing success\n"); dev_info(&func->dev, "Driver Initializing success\n");
return 0; return 0;
......
...@@ -113,12 +113,13 @@ static int wilc_bus_probe(struct spi_device *spi) ...@@ -113,12 +113,13 @@ static int wilc_bus_probe(struct spi_device *spi)
if (gpio < 0) if (gpio < 0)
gpio = GPIO_NUM; gpio = GPIO_NUM;
ret = wilc_netdev_init(&wilc, NULL, HIF_SPI, GPIO_NUM, &wilc_hif_spi); ret = wilc_netdev_init(&wilc, NULL, HIF_SPI, &wilc_hif_spi);
if (ret) if (ret)
return ret; return ret;
spi_set_drvdata(spi, wilc); spi_set_drvdata(spi, wilc);
wilc->dev = &spi->dev; wilc->dev = &spi->dev;
wilc->gpio = gpio;
return 0; return 0;
} }
......
...@@ -174,7 +174,7 @@ void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset); ...@@ -174,7 +174,7 @@ void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset);
void wilc_mac_indicate(struct wilc *wilc); void wilc_mac_indicate(struct wilc *wilc);
void wilc_netdev_cleanup(struct wilc *wilc); void wilc_netdev_cleanup(struct wilc *wilc);
int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
int gpio, const struct wilc_hif_func *ops); const struct wilc_hif_func *ops);
void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size); void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
int wilc_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid, u8 mode); int wilc_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid, u8 mode);
......
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