diff options
| author | Ben Greear <greearb@candelatech.com> | 2010-11-29 17:13:22 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-12-02 15:16:41 -0500 |
| commit | eb272441fc14ad126abfa46de8a9c58bda8added (patch) | |
| tree | f515a84a67da57721bd8672c730182ad05c49511 /drivers/net/wireless/ath/ath9k/debug.c | |
| parent | 8cbe6e66889d2e4dbea37b2fc6f276bd69d1ef67 (diff) | |
ath9k: Move debugfs under ieee80211/[phyname]/ath9k/
This fixes debugfs problems when a phy is renamed,
and is able to remove a bit of code that is no longer
needed.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 0c3c74c157fb..3586c43077a7 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
| @@ -24,8 +24,6 @@ | |||
| 24 | #define REG_READ_D(_ah, _reg) \ | 24 | #define REG_READ_D(_ah, _reg) \ |
| 25 | ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) | 25 | ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) |
| 26 | 26 | ||
| 27 | static struct dentry *ath9k_debugfs_root; | ||
| 28 | |||
| 29 | static int ath9k_debugfs_open(struct inode *inode, struct file *file) | 27 | static int ath9k_debugfs_open(struct inode *inode, struct file *file) |
| 30 | { | 28 | { |
| 31 | file->private_data = inode->i_private; | 29 | file->private_data = inode->i_private; |
| @@ -878,11 +876,8 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
| 878 | struct ath_common *common = ath9k_hw_common(ah); | 876 | struct ath_common *common = ath9k_hw_common(ah); |
| 879 | struct ath_softc *sc = (struct ath_softc *) common->priv; | 877 | struct ath_softc *sc = (struct ath_softc *) common->priv; |
| 880 | 878 | ||
| 881 | if (!ath9k_debugfs_root) | 879 | sc->debug.debugfs_phy = debugfs_create_dir("ath9k", |
| 882 | return -ENOENT; | 880 | sc->hw->wiphy->debugfsdir); |
| 883 | |||
| 884 | sc->debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy), | ||
| 885 | ath9k_debugfs_root); | ||
| 886 | if (!sc->debug.debugfs_phy) | 881 | if (!sc->debug.debugfs_phy) |
| 887 | return -ENOMEM; | 882 | return -ENOMEM; |
| 888 | 883 | ||
| @@ -935,29 +930,7 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
| 935 | sc->debug.regidx = 0; | 930 | sc->debug.regidx = 0; |
| 936 | return 0; | 931 | return 0; |
| 937 | err: | 932 | err: |
| 938 | ath9k_exit_debug(ah); | ||
| 939 | return -ENOMEM; | ||
| 940 | } | ||
| 941 | |||
| 942 | void ath9k_exit_debug(struct ath_hw *ah) | ||
| 943 | { | ||
| 944 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 945 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
| 946 | |||
| 947 | debugfs_remove_recursive(sc->debug.debugfs_phy); | 933 | debugfs_remove_recursive(sc->debug.debugfs_phy); |
| 948 | } | 934 | sc->debug.debugfs_phy = NULL; |
| 949 | 935 | return -ENOMEM; | |
| 950 | int ath9k_debug_create_root(void) | ||
| 951 | { | ||
| 952 | ath9k_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); | ||
| 953 | if (!ath9k_debugfs_root) | ||
| 954 | return -ENOENT; | ||
| 955 | |||
| 956 | return 0; | ||
| 957 | } | ||
| 958 | |||
| 959 | void ath9k_debug_remove_root(void) | ||
| 960 | { | ||
| 961 | debugfs_remove(ath9k_debugfs_root); | ||
| 962 | ath9k_debugfs_root = NULL; | ||
| 963 | } | 936 | } |
