aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-11-25 12:26:07 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-29 14:41:28 -0500
commit98c316e348bedffa730e6f1e4baeb8a3c3e0f28b (patch)
tree9f09743b48ec9b06681dfb387f0f4cb557c515b3 /drivers/net/wireless/ath/ath9k/init.c
parent16ccdf0dbc84b11bc8b7fdbad66804d06a683554 (diff)
ath9k: use per-device struct for pm_qos_* operations
The ath9k driver uses a shared pm_qos_request_list structure for all devices. This causes the following warning if more than one device is present in the system: WARNING: at kernel/pm_qos_params.c:234 ath9k_init_device+0x5e8/0x6b0() pm_qos_add_request() called for already added request Modules linked in: Call Trace: [<802b1cdc>] dump_stack+0x8/0x34 [<8007dd90>] warn_slowpath_common+0x78/0xa4 [<8007de44>] warn_slowpath_fmt+0x2c/0x38 [<801b0828>] ath9k_init_device+0x5e8/0x6b0 [<801bc508>] ath_pci_probe+0x2dc/0x39c [<80176254>] pci_device_probe+0x64/0xa4 [<8019471c>] driver_probe_device+0xbc/0x188 [<80194854>] __driver_attach+0x6c/0xa4 [<80193e20>] bus_for_each_dev+0x60/0xb0 [<80193580>] bus_add_driver+0xcc/0x268 [<80194c08>] driver_register+0xe0/0x198 [<801764e0>] __pci_register_driver+0x50/0xe0 [<80365f48>] ath9k_init+0x3c/0x6c [<8006050c>] do_one_initcall+0xfc/0x1d8 [<80355340>] kernel_init+0xd4/0x174 [<800639a4>] kernel_thread_helper+0x10/0x18 ---[ end trace 5345fc6f870564a6 ]--- This patch fixes that warning by using a separate pm_qos_request_list sructure for each device. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 92bc5c5f4876..c29eea26a777 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/pm_qos_params.h>
19 18
20#include "ath9k.h" 19#include "ath9k.h"
21 20
@@ -180,8 +179,6 @@ static const struct ath_ops ath9k_common_ops = {
180 .write = ath9k_iowrite32, 179 .write = ath9k_iowrite32,
181}; 180};
182 181
183struct pm_qos_request_list ath9k_pm_qos_req;
184
185/**************************/ 182/**************************/
186/* Initialization */ 183/* Initialization */
187/**************************/ 184/**************************/
@@ -759,7 +756,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
759 ath_init_leds(sc); 756 ath_init_leds(sc);
760 ath_start_rfkill_poll(sc); 757 ath_start_rfkill_poll(sc);
761 758
762 pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 759 pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
763 PM_QOS_DEFAULT_VALUE); 760 PM_QOS_DEFAULT_VALUE);
764 761
765 return 0; 762 return 0;
@@ -830,7 +827,7 @@ void ath9k_deinit_device(struct ath_softc *sc)
830 } 827 }
831 828
832 ieee80211_unregister_hw(hw); 829 ieee80211_unregister_hw(hw);
833 pm_qos_remove_request(&ath9k_pm_qos_req); 830 pm_qos_remove_request(&sc->pm_qos_req);
834 ath_rx_cleanup(sc); 831 ath_rx_cleanup(sc);
835 ath_tx_cleanup(sc); 832 ath_tx_cleanup(sc);
836 ath9k_deinit_softc(sc); 833 ath9k_deinit_softc(sc);