aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-07-05 16:53:06 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-07-18 20:00:34 -0400
commit82f682514a5df89ffb3890627eebf0897b7a84ec (patch)
tree27a3dba7a179102ac5bfdd5935679bd2abd3f70f /drivers/net/igbvf
parent5f279845f9d684661563894d44729a0c706375b4 (diff)
pm_qos: Get rid of the allocation in pm_qos_add_request()
All current users of pm_qos_add_request() have the ability to supply the memory required by the pm_qos routines, so make them do this and eliminate the kmalloc() with pm_qos_add_request(). This has the double benefit of making the call never fail and allowing it to be called from atomic context. Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: mark gross <markgross@thegnar.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/net/igbvf')
-rw-r--r--drivers/net/igbvf/netdev.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 5e2b2a8c56c6..add6197d3bcb 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -48,7 +48,7 @@
48#define DRV_VERSION "1.0.0-k0" 48#define DRV_VERSION "1.0.0-k0"
49char igbvf_driver_name[] = "igbvf"; 49char igbvf_driver_name[] = "igbvf";
50const char igbvf_driver_version[] = DRV_VERSION; 50const char igbvf_driver_version[] = DRV_VERSION;
51struct pm_qos_request_list *igbvf_driver_pm_qos_req; 51static struct pm_qos_request_list igbvf_driver_pm_qos_req;
52static const char igbvf_driver_string[] = 52static const char igbvf_driver_string[] =
53 "Intel(R) Virtual Function Network Driver"; 53 "Intel(R) Virtual Function Network Driver";
54static const char igbvf_copyright[] = "Copyright (c) 2009 Intel Corporation."; 54static const char igbvf_copyright[] = "Copyright (c) 2009 Intel Corporation.";
@@ -2902,8 +2902,8 @@ static int __init igbvf_init_module(void)
2902 printk(KERN_INFO "%s\n", igbvf_copyright); 2902 printk(KERN_INFO "%s\n", igbvf_copyright);
2903 2903
2904 ret = pci_register_driver(&igbvf_driver); 2904 ret = pci_register_driver(&igbvf_driver);
2905 igbvf_driver_pm_qos_req = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY, 2905 pm_qos_add_request(&igbvf_driver_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
2906 PM_QOS_DEFAULT_VALUE); 2906 PM_QOS_DEFAULT_VALUE);
2907 2907
2908 return ret; 2908 return ret;
2909} 2909}
@@ -2918,8 +2918,7 @@ module_init(igbvf_init_module);
2918static void __exit igbvf_exit_module(void) 2918static void __exit igbvf_exit_module(void)
2919{ 2919{
2920 pci_unregister_driver(&igbvf_driver); 2920 pci_unregister_driver(&igbvf_driver);
2921 pm_qos_remove_request(igbvf_driver_pm_qos_req); 2921 pm_qos_remove_request(&igbvf_driver_pm_qos_req);
2922 igbvf_driver_pm_qos_req = NULL;
2923} 2922}
2924module_exit(igbvf_exit_module); 2923module_exit(igbvf_exit_module);
2925 2924