ath5k: Move debugfs under ieee80211/[wiphy-name]
RFC 1/1 ath5k: Move debugfs under ieee80211/[wiphy-name]
From: Ben Greear <[email protected]>
This automatically keeps things proper when wiphy
is renamed.
Based on patch by Johannes Berg <[email protected]>
---
:100644 100644 c9732a6... 032c2ee... M drivers/net/wireless/ath/ath5k/base.c
:100644 100644 a342a9d... 673ab83... M drivers/net/wireless/ath/ath5k/debug.c
drivers/net/wireless/ath/ath5k/base.c | 3 +-- drivers/net/wireless/ath/ath5k/debug.c | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +1 -2
@@ -3543,8 +3543,6 @@ ath5k_pci_probe(struct pci_dev *pdev, sc->hw = hw; sc->pdev = pdev; -ath5k_debug_init_device (sc); -/* * Mark the device as detached to avoid processing * interrupts until setup is complete.
@@ -3652,6 +3650,7 @@ ath5k_pci_probe(struct pci_dev *pdev, } } +ath5k_debug_init_device (sc);/* ready to process interrupts */ __clear_bit (ATH_STAT_INVALID , sc->status);
drivers/net/wireless/ath/ath5k/debug.c +2 -6
@@ -72,8 +72,6 @@ module_param_named(debug, ath5k_debug, uint, 0);#include "reg.h" #include "ani.h" -static struct dentry *ath5k_global_debugfs; -static int ath5k_debugfs_open (struct inode *inode,struct file *file) { file->private_data = inode->i_private;
@@ -894,7 +892,6 @@ static const struct file_operations fops_queue = {void ath5k_debug_init (void ) { - ath5k_global_debugfs =debugfs_create_dir ("ath5k" ,NULL ); }void
@@ -902,8 +899,8 @@ ath5k_debug_init_device(struct ath5k_softc *sc) { sc->debug.level = ath5k_debug; - sc->debug.debugfs_phydir =debugfs_create_dir (wiphy_name (sc->hw->wiphy), - ath5k_global_debugfs); + sc->debug.debugfs_phydir =debugfs_create_dir ("ath5k" , + sc->hw->wiphy->debugfsdir); sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUSR,
@@ -946,7 +943,6 @@ ath5k_debug_init_device(struct ath5k_softc *sc)void ath5k_debug_finish (void ) { -debugfs_remove (ath5k_global_debugfs); }void
Signature · 1 line
1.7.2.2
Quoted 72 lines · On Tue October 12 2010 04:20:41 [email protected] wrote:
From: Ben Greear <[email protected]>
This automatically keeps things proper when wiphy
is renamed.Based on patch by Johannes Berg <[email protected]>
Signed-off-by Ben Greear <[email protected]>---
:100644 100644 c9732a6... 032c2ee...
:Mdrivers/net/wireless/ath/ath5k/base.c100644 100644 a342a9d...
:673ab83... Mdrivers/net/wireless/ath/ath5k/debug.cdrivers/net/wireless/ath/ath5k/base.c | 3 +-- drivers/net/wireless/ath/ath5k/debug.c | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-)(quoted diff) +0
-0
b/drivers/net/wireless/ath/ath5k/base.cindex c9732a6..032c2ee 100644drivers/net/wireless/ath/ath5k/base.c +1
-2@@ -3543,8 +3543,6 @@ ath5k_pci_probe(struct pci_dev *pdev, sc->hw = hw; sc->pdev = pdev; -ath5k_debug_init_device (sc); -/* * Mark the device as detached to avoid processing * interrupts until setup is complete. @@ -3652,6 +3650,7 @@ ath5k_pci_probe(struct pci_dev *pdev, } } +ath5k_debug_init_device (sc);/* ready to process interrupts */ __clear_bit (ATH_STAT_INVALID , sc->status);(quoted diff) +0
-0
b/drivers/net/wireless/ath/ath5k/debug.cindex a342a9d..673ab83 100644drivers/net/wireless/ath/ath5k/debug.c +2
-5@@ -72,8 +72,6 @@ module_param_named(debug, ath5k_debug, uint, 0);#include "reg.h" #include "ani.h" -static struct dentry *ath5k_global_debugfs; -static int ath5k_debugfs_open (struct inode *inode,struct file *file) { file->private_data = inode->i_private;@@ -894,7 +892,6 @@ static const struct file_operations fops_queue = {void ath5k_debug_init (void ) { - ath5k_global_debugfs =debugfs_create_dir ("ath5k" ,NULL ); }void @@ -902,8 +899,8 @@ ath5k_debug_init_device(struct ath5k_softc *sc) { sc->debug.level = ath5k_debug; - sc->debug.debugfs_phydir =debugfs_create_dir (wiphy_name (sc->hw->wiphy), - ath5k_global_debugfs); + sc->debug.debugfs_phydir =debugfs_create_dir ("ath5k" , + sc->hw->wiphy->debugfsdir); sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUSR,
drivers/net/wireless/ath/ath5k/debug.c ath5k_debug_init_device(struct ath5k_softc *sc) · line 948
Quoted 7 lines
drivers/net/wireless/ath/ath5k/debug.c +0
-1@@ -946,7 +943,6 @@ ath5k_debug_init_device(struct ath5k_softc *sc)void ath5k_debug_finish (void ) { -debugfs_remove (ath5k_global_debugfs); }void
drivers/net/wireless/ath/ath5k/debug.c static const struct file_operations fops_queue = { · line 895
Quoted 5 lines · On Mon, 2010-10-11 at 12:20 -0700, [email protected] wrote:
void
ath5k_debug_init(void)
{drivers/net/wireless/ath/ath5k/debug.c +0
-1- ath5k_global_debugfs =debugfs_create_dir ("ath5k" ,NULL ); }
I didn't really intend for my patch to get merged -- at least you should also remove this now useless function and its callers and prototypes.
johannes
Quoted 10 lines · Johannes Berg
drivers/net/wireless/ath/ath5k/debug.c static const struct file_operations fops_queue = { · line 895
Quoted 5 lines · On Mon, 2010-10-11 at 12:20 -0700, [email protected] wrote:
void ath5k_debug_init(void) {drivers/net/wireless/ath/ath5k/debug.c +0
-1- ath5k_global_debugfs =debugfs_create_dir ("ath5k" ,NULL ); }I didn't really intend for my patch to get merged -- at least you should also remove this now useless function and its callers and prototypes.
I'll send an updated patch later today.
Thanks,
Ben
Quoted 2 lines
johannes
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com