diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-03-05 16:55:18 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:27 -0400 |
commit | 19d8bc22bcea749da2ba065a1ff9e054fadb556e (patch) | |
tree | 69c5d473198e963bdb298fb9411e1f52f7770067 /drivers/net/wireless/ath9k/main.c | |
parent | 0eeb59fe2cd84b62f374874a59e62402e13f48b3 (diff) | |
download | op-kernel-dev-19d8bc22bcea749da2ba065a1ff9e054fadb556e.zip op-kernel-dev-19d8bc22bcea749da2ba065a1ff9e054fadb556e.tar.gz |
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.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index f473fee..bb30ccc 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) goto err_out; } + error = ath9k_debug_create_root(); + if (error) { + printk(KERN_ERR + "ath9k: Unable to create debugfs root: %d\n", + error); + goto err_rate_unregister; + } + error = ath_pci_init(); if (error < 0) { printk(KERN_ERR "ath9k: No PCI devices found, driver not installed.\n"); error = -ENODEV; - goto err_rate_unregister; + goto err_remove_root; } error = ath_ahb_init(); @@ -2877,6 +2885,8 @@ static int __init ath9k_init(void) err_pci_exit: ath_pci_exit(); + err_remove_root: + ath9k_debug_remove_root(); err_rate_unregister: ath_rate_control_unregister(); err_out: @@ -2888,6 +2898,7 @@ static void __exit ath9k_exit(void) { ath_ahb_exit(); ath_pci_exit(); + ath9k_debug_remove_root(); ath_rate_control_unregister(); printk(KERN_INFO "%s: Driver unloaded\n", dev_info); } |