diff options
author | Mithlesh Thukral <mithlesh@linsyssoft.com> | 2009-03-25 15:51:14 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 11:06:31 -0700 |
commit | cc4b8dfc3ff32f890cd5de0ce22de44f124d0d05 (patch) | |
tree | 87599f51989f80cb86f9da51ce75da0a10a88ff2 /drivers/staging | |
parent | 8d17e6ad8113f7534d978b1b3511f62637483fcc (diff) | |
download | kernel_samsung_aries-cc4b8dfc3ff32f890cd5de0ce22de44f124d0d05.zip kernel_samsung_aries-cc4b8dfc3ff32f890cd5de0ce22de44f124d0d05.tar.gz kernel_samsung_aries-cc4b8dfc3ff32f890cd5de0ce22de44f124d0d05.tar.bz2 |
Staging: sxg: Fix sleep in atomic context warning while loading driver
Leave a spinlock before calling request_irq(). request_irq() calls kmalloc
which can sleep. This was generating a warning dump while driver is loaded.
Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/sxg/sxg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/sxg/sxg.c b/drivers/staging/sxg/sxg.c index d8edf42..583fbb4 100644 --- a/drivers/staging/sxg/sxg.c +++ b/drivers/staging/sxg/sxg.c @@ -322,6 +322,8 @@ int sxg_add_msi_isr(struct adapter_t *adapter) int ret,i; if (!adapter->intrregistered) { + spin_unlock_irqrestore(&sxg_global.driver_lock, + sxg_global.flags); for (i=0; i<adapter->nr_msix_entries; i++) { ret = request_irq (adapter->msi_entries[i].vector, sxg_isr, @@ -329,6 +331,8 @@ int sxg_add_msi_isr(struct adapter_t *adapter) adapter->netdev->name, adapter->netdev); if (ret) { + spin_lock_irqsave(&sxg_global.driver_lock, + sxg_global.flags); DBG_ERROR("sxg: MSI-X request_irq (%s) " "FAILED [%x]\n", adapter->netdev->name, ret); @@ -336,6 +340,7 @@ int sxg_add_msi_isr(struct adapter_t *adapter) } } } + spin_lock_irqsave(&sxg_global.driver_lock, sxg_global.flags); adapter->msi_enabled = TRUE; adapter->intrregistered = 1; adapter->IntRegistered = TRUE; |