Commit af9ae09a authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman

staging: wilc1000: wilc_wlan.c: remove hif_func of wilc_wlan_dev_t

hif_func of wilc_wlan_dev_t is duplicate because we have same struct
wilc_hif_func ops of struct wilc which is available in wilc_wlan.c.
Rename ops of struct wilc with hif_func and remove hif_func of wilc_wlan_dev_t,
and use wilc->hif_func instead of g_wlan.hif_func in all functions.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9e6627ac
...@@ -750,9 +750,9 @@ void wilc1000_wlan_deinit(struct net_device *dev) ...@@ -750,9 +750,9 @@ void wilc1000_wlan_deinit(struct net_device *dev)
PRINT_D(INIT_DBG, "Disabling IRQ\n"); PRINT_D(INIT_DBG, "Disabling IRQ\n");
if (!wl->dev_irq_num && if (!wl->dev_irq_num &&
wl->ops->disable_interrupt) { wl->hif_func->disable_interrupt) {
mutex_lock(&wl->hif_cs); mutex_lock(&wl->hif_cs);
wl->ops->disable_interrupt(wl); wl->hif_func->disable_interrupt(wl);
mutex_unlock(&wl->hif_cs); mutex_unlock(&wl->hif_cs);
} }
if (&wl->txq_event) if (&wl->txq_event)
...@@ -770,12 +770,12 @@ void wilc1000_wlan_deinit(struct net_device *dev) ...@@ -770,12 +770,12 @@ void wilc1000_wlan_deinit(struct net_device *dev)
wilc_wlan_cleanup(dev); wilc_wlan_cleanup(dev);
#if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31) #if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31)
if (!wl->dev_irq_num && if (!wl->dev_irq_num &&
wl->ops->disable_interrupt) { wl->hif_func->disable_interrupt) {
PRINT_D(INIT_DBG, "Disabling IRQ 2\n"); PRINT_D(INIT_DBG, "Disabling IRQ 2\n");
mutex_lock(&wl->hif_cs); mutex_lock(&wl->hif_cs);
wl->ops->disable_interrupt(wl); wl->hif_func->disable_interrupt(wl);
mutex_unlock(&wl->hif_cs); mutex_unlock(&wl->hif_cs);
} }
#endif #endif
...@@ -911,8 +911,8 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) ...@@ -911,8 +911,8 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
} }
if (!wl->dev_irq_num && if (!wl->dev_irq_num &&
wl->ops->enable_interrupt && wl->hif_func->enable_interrupt &&
wl->ops->enable_interrupt(wl)) { wl->hif_func->enable_interrupt(wl)) {
PRINT_ER("couldn't initialize IRQ\n"); PRINT_ER("couldn't initialize IRQ\n");
ret = -EIO; ret = -EIO;
goto _fail_irq_init_; goto _fail_irq_init_;
...@@ -964,8 +964,8 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) ...@@ -964,8 +964,8 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
_fail_irq_enable_: _fail_irq_enable_:
if (!wl->dev_irq_num && if (!wl->dev_irq_num &&
wl->ops->disable_interrupt) wl->hif_func->disable_interrupt)
wl->ops->disable_interrupt(wl); wl->hif_func->disable_interrupt(wl);
_fail_irq_init_: _fail_irq_init_:
if (wl->dev_irq_num) if (wl->dev_irq_num)
deinit_irq(dev); deinit_irq(dev);
...@@ -1438,7 +1438,7 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, ...@@ -1438,7 +1438,7 @@ 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->gpio = gpio;
wl->ops = ops; wl->hif_func = ops;
register_inetaddr_notifier(&g_dev_notifier); register_inetaddr_notifier(&g_dev_notifier);
......
...@@ -156,7 +156,7 @@ struct wilc_vif { ...@@ -156,7 +156,7 @@ struct wilc_vif {
}; };
struct wilc { struct wilc {
const struct wilc_hif_func *ops; const struct wilc_hif_func *hif_func;
int io_type; int io_type;
int mac_status; int mac_status;
int gpio; int gpio;
......
This diff is collapsed.
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