summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Lee <glen.lee@atmel.com>2015-10-27 18:27:37 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-29 08:08:47 +0900
commit3948362d56e5f0ca29f597e75e8b09d6dd8edfd4 (patch)
tree9720297b0e7c2bfa79da325cf0b37048e0fd574f
parent702c0e50f6b3fc8f3b7718a0fc2b467841671afb (diff)
staging: wicl1000: isr_uh_routine: use netdev private wilc
Use netdev private member wilc instead of g_linux_wlan and change argument wilc with dev in the function request_threaded_irq to pass back to handler the function isr_uh_routine. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/linux_wlan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index ded302a4ccb3..324cc5720bb1 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -229,10 +229,16 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
static irqreturn_t isr_uh_routine(int irq, void *user_data)
{
+ perInterface_wlan_t *nic;
+ struct wilc *wilc;
+ struct net_device *dev = (struct net_device *)user_data;
+
+ nic = netdev_priv(dev);
+ wilc = nic->wilc;
PRINT_D(INT_DBG, "Interrupt received UH\n");
/*While mac is closing cacncel the handling of any interrupts received*/
- if (g_linux_wlan->close) {
+ if (wilc->close) {
PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n");
return IRQ_HANDLED;
}
@@ -284,7 +290,7 @@ static int init_irq(struct net_device *dev)
if ((ret != -1) && (request_threaded_irq(wl->dev_irq_num, isr_uh_routine, isr_bh_routine,
IRQF_TRIGGER_LOW | IRQF_ONESHOT, /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/
- "WILC_IRQ", wl)) < 0) {
+ "WILC_IRQ", dev)) < 0) {
PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM);
ret = -1;