Commit d84a35d1 authored by Ben Greear's avatar Ben Greear Committed by John W. Linville

ath5k: Move debugfs under ieee80211/[wiphy-name]

This automatically keeps things proper when wiphy
is renamed.

Based on patch by Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Acked-by: default avatarBruno Randolf <br1@einfach.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 10d8dad8
...@@ -3541,8 +3541,6 @@ ath5k_pci_probe(struct pci_dev *pdev, ...@@ -3541,8 +3541,6 @@ ath5k_pci_probe(struct pci_dev *pdev,
sc->hw = hw; sc->hw = hw;
sc->pdev = pdev; sc->pdev = pdev;
ath5k_debug_init_device(sc);
/* /*
* Mark the device as detached to avoid processing * Mark the device as detached to avoid processing
* interrupts until setup is complete. * interrupts until setup is complete.
...@@ -3650,6 +3648,7 @@ ath5k_pci_probe(struct pci_dev *pdev, ...@@ -3650,6 +3648,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
} }
} }
ath5k_debug_init_device(sc);
/* ready to process interrupts */ /* ready to process interrupts */
__clear_bit(ATH_STAT_INVALID, sc->status); __clear_bit(ATH_STAT_INVALID, sc->status);
...@@ -3736,8 +3735,6 @@ init_ath5k_pci(void) ...@@ -3736,8 +3735,6 @@ init_ath5k_pci(void)
{ {
int ret; int ret;
ath5k_debug_init();
ret = pci_register_driver(&ath5k_pci_driver); ret = pci_register_driver(&ath5k_pci_driver);
if (ret) { if (ret) {
printk(KERN_ERR "ath5k_pci: can't register pci driver\n"); printk(KERN_ERR "ath5k_pci: can't register pci driver\n");
...@@ -3751,8 +3748,6 @@ static void __exit ...@@ -3751,8 +3748,6 @@ static void __exit
exit_ath5k_pci(void) exit_ath5k_pci(void)
{ {
pci_unregister_driver(&ath5k_pci_driver); pci_unregister_driver(&ath5k_pci_driver);
ath5k_debug_finish();
} }
module_init(init_ath5k_pci); module_init(init_ath5k_pci);
......
...@@ -72,8 +72,6 @@ module_param_named(debug, ath5k_debug, uint, 0); ...@@ -72,8 +72,6 @@ module_param_named(debug, ath5k_debug, uint, 0);
#include "reg.h" #include "reg.h"
#include "ani.h" #include "ani.h"
static struct dentry *ath5k_global_debugfs;
static int ath5k_debugfs_open(struct inode *inode, struct file *file) static int ath5k_debugfs_open(struct inode *inode, struct file *file)
{ {
file->private_data = inode->i_private; file->private_data = inode->i_private;
...@@ -882,21 +880,13 @@ static const struct file_operations fops_queue = { ...@@ -882,21 +880,13 @@ static const struct file_operations fops_queue = {
}; };
/* init */
void
ath5k_debug_init(void)
{
ath5k_global_debugfs = debugfs_create_dir("ath5k", NULL);
}
void void
ath5k_debug_init_device(struct ath5k_softc *sc) ath5k_debug_init_device(struct ath5k_softc *sc)
{ {
sc->debug.level = ath5k_debug; sc->debug.level = ath5k_debug;
sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), sc->debug.debugfs_phydir = debugfs_create_dir("ath5k",
ath5k_global_debugfs); sc->hw->wiphy->debugfsdir);
sc->debug.debugfs_debug = debugfs_create_file("debug", sc->debug.debugfs_debug = debugfs_create_file("debug",
S_IWUSR | S_IRUSR, S_IWUSR | S_IRUSR,
...@@ -936,12 +926,6 @@ ath5k_debug_init_device(struct ath5k_softc *sc) ...@@ -936,12 +926,6 @@ ath5k_debug_init_device(struct ath5k_softc *sc)
&fops_queue); &fops_queue);
} }
void
ath5k_debug_finish(void)
{
debugfs_remove(ath5k_global_debugfs);
}
void void
ath5k_debug_finish_device(struct ath5k_softc *sc) ath5k_debug_finish_device(struct ath5k_softc *sc)
{ {
......
...@@ -137,15 +137,9 @@ enum ath5k_debug_level { ...@@ -137,15 +137,9 @@ enum ath5k_debug_level {
__func__, __LINE__, ##__VA_ARGS__); \ __func__, __LINE__, ##__VA_ARGS__); \
} while (0) } while (0)
void
ath5k_debug_init(void);
void void
ath5k_debug_init_device(struct ath5k_softc *sc); ath5k_debug_init_device(struct ath5k_softc *sc);
void
ath5k_debug_finish(void);
void void
ath5k_debug_finish_device(struct ath5k_softc *sc); ath5k_debug_finish_device(struct ath5k_softc *sc);
...@@ -173,15 +167,9 @@ static inline void __attribute__ ((format (printf, 3, 4))) ...@@ -173,15 +167,9 @@ static inline void __attribute__ ((format (printf, 3, 4)))
ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...)
{} {}
static inline void
ath5k_debug_init(void) {}
static inline void static inline void
ath5k_debug_init_device(struct ath5k_softc *sc) {} ath5k_debug_init_device(struct ath5k_softc *sc) {}
static inline void
ath5k_debug_finish(void) {}
static inline void static inline void
ath5k_debug_finish_device(struct ath5k_softc *sc) {} ath5k_debug_finish_device(struct ath5k_softc *sc) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment