aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlen Lee <glen.lee@atmel.com>2015-10-27 05:27:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-28 19:08:47 -0400
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
229#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) 229#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
230static irqreturn_t isr_uh_routine(int irq, void *user_data) 230static irqreturn_t isr_uh_routine(int irq, void *user_data)
231{ 231{
232 perInterface_wlan_t *nic;
233 struct wilc *wilc;
234 struct net_device *dev = (struct net_device *)user_data;
235
236 nic = netdev_priv(dev);
237 wilc = nic->wilc;
232 PRINT_D(INT_DBG, "Interrupt received UH\n"); 238 PRINT_D(INT_DBG, "Interrupt received UH\n");
233 239
234 /*While mac is closing cacncel the handling of any interrupts received*/ 240 /*While mac is closing cacncel the handling of any interrupts received*/
235 if (g_linux_wlan->close) { 241 if (wilc->close) {
236 PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n"); 242 PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n");
237 return IRQ_HANDLED; 243 return IRQ_HANDLED;
238 } 244 }
@@ -284,7 +290,7 @@ static int init_irq(struct net_device *dev)
284 290
285 if ((ret != -1) && (request_threaded_irq(wl->dev_irq_num, isr_uh_routine, isr_bh_routine, 291 if ((ret != -1) && (request_threaded_irq(wl->dev_irq_num, isr_uh_routine, isr_bh_routine,
286 IRQF_TRIGGER_LOW | IRQF_ONESHOT, /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/ 292 IRQF_TRIGGER_LOW | IRQF_ONESHOT, /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/
287 "WILC_IRQ", wl)) < 0) { 293 "WILC_IRQ", dev)) < 0) {
288 294
289 PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM); 295 PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM);
290 ret = -1; 296 ret = -1;