diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-28 02:54:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:42 -0400 |
commit | bc974f4a230756faf4f69114f271de2e678b363b (patch) | |
tree | 44b132a4a5de62ade4d02b42c70faa70bc84254e /drivers/net/wireless/ath/ath9k/debug.c | |
parent | 7c89606e24cdabaceb8ca9b3c7ab866c6bcc9e38 (diff) |
atheros: define a common priv struct
hw code should never use private driver data, but
sometimes we need a backpointer so just stuff it on
the common ath struct.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.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 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 352914cae6d..25ae88ebdfa 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -562,8 +562,8 @@ static const struct file_operations fops_xmit = { | |||
562 | 562 | ||
563 | int ath9k_init_debug(struct ath_hw *ah) | 563 | int ath9k_init_debug(struct ath_hw *ah) |
564 | { | 564 | { |
565 | struct ath_softc *sc = ah->ah_sc; | 565 | struct ath_common *common = ath9k_hw_common(ah); |
566 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 566 | struct ath_softc *sc = (struct ath_softc *) common->priv; |
567 | 567 | ||
568 | common->debug_mask = ath9k_debug; | 568 | common->debug_mask = ath9k_debug; |
569 | 569 | ||
@@ -620,7 +620,8 @@ err: | |||
620 | 620 | ||
621 | void ath9k_exit_debug(struct ath_hw *ah) | 621 | void ath9k_exit_debug(struct ath_hw *ah) |
622 | { | 622 | { |
623 | struct ath_softc *sc = ah->ah_sc; | 623 | struct ath_common *common = ath9k_hw_common(ah); |
624 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
624 | 625 | ||
625 | debugfs_remove(sc->debug.debugfs_xmit); | 626 | debugfs_remove(sc->debug.debugfs_xmit); |
626 | debugfs_remove(sc->debug.debugfs_wiphy); | 627 | debugfs_remove(sc->debug.debugfs_wiphy); |