aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-03-05 10:55:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:27 -0400
commit19d8bc22bcea749da2ba065a1ff9e054fadb556e (patch)
tree69c5d473198e963bdb298fb9411e1f52f7770067 /drivers/net/wireless/ath9k/main.c
parent0eeb59fe2cd84b62f374874a59e62402e13f48b3 (diff)
ath9k: create a common debugfs_root for all device instances
The driver are trying to create an 'ath9k' directory in debugfs for each device currently. If there are more than one device in the system, the second try will always fail. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index f473fee72a2e..bb30ccca1843 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2858,12 +2858,20 @@ static int __init ath9k_init(void)
2858 goto err_out; 2858 goto err_out;
2859 } 2859 }
2860 2860
2861 error = ath9k_debug_create_root();
2862 if (error) {
2863 printk(KERN_ERR
2864 "ath9k: Unable to create debugfs root: %d\n",
2865 error);
2866 goto err_rate_unregister;
2867 }
2868
2861 error = ath_pci_init(); 2869 error = ath_pci_init();
2862 if (error < 0) { 2870 if (error < 0) {
2863 printk(KERN_ERR 2871 printk(KERN_ERR
2864 "ath9k: No PCI devices found, driver not installed.\n"); 2872 "ath9k: No PCI devices found, driver not installed.\n");
2865 error = -ENODEV; 2873 error = -ENODEV;
2866 goto err_rate_unregister; 2874 goto err_remove_root;
2867 } 2875 }
2868 2876
2869 error = ath_ahb_init(); 2877 error = ath_ahb_init();
@@ -2877,6 +2885,8 @@ static int __init ath9k_init(void)
2877 err_pci_exit: 2885 err_pci_exit:
2878 ath_pci_exit(); 2886 ath_pci_exit();
2879 2887
2888 err_remove_root:
2889 ath9k_debug_remove_root();
2880 err_rate_unregister: 2890 err_rate_unregister:
2881 ath_rate_control_unregister(); 2891 ath_rate_control_unregister();
2882 err_out: 2892 err_out:
@@ -2888,6 +2898,7 @@ static void __exit ath9k_exit(void)
2888{ 2898{
2889 ath_ahb_exit(); 2899 ath_ahb_exit();
2890 ath_pci_exit(); 2900 ath_pci_exit();
2901 ath9k_debug_remove_root();
2891 ath_rate_control_unregister(); 2902 ath_rate_control_unregister();
2892 printk(KERN_INFO "%s: Driver unloaded\n", dev_info); 2903 printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
2893} 2904}