ath9k: add some minor debugfs cleanups
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 560-ath9k_debugfs_cleanup.patch
1 --- a/drivers/net/wireless/ath/ath9k/debug.c
2 +++ b/drivers/net/wireless/ath/ath9k/debug.c
3 @@ -1135,76 +1135,43 @@ int ath9k_init_debug(struct ath_hw *ah)
4 return -ENOMEM;
5
6 #ifdef CONFIG_ATH_DEBUG
7 - if (!debugfs_create_file("debug", S_IRUSR | S_IWUSR,
8 - sc->debug.debugfs_phy, sc, &fops_debug))
9 - goto err;
10 + debugfs_create_file("debug", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
11 + sc, &fops_debug);
12 #endif
13 -
14 - if (!debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy,
15 - sc, &fops_dma))
16 - goto err;
17 -
18 - if (!debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy,
19 - sc, &fops_interrupt))
20 - goto err;
21 -
22 - if (!debugfs_create_file("wiphy", S_IRUSR | S_IWUSR,
23 - sc->debug.debugfs_phy, sc, &fops_wiphy))
24 - goto err;
25 -
26 - if (!debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy,
27 - sc, &fops_xmit))
28 - goto err;
29 -
30 - if (!debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy,
31 - sc, &fops_stations))
32 - goto err;
33 -
34 - if (!debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy,
35 - sc, &fops_misc))
36 - goto err;
37 -
38 - if (!debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy,
39 - sc, &fops_recv))
40 - goto err;
41 -
42 - if (!debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR,
43 - sc->debug.debugfs_phy, sc, &fops_rx_chainmask))
44 - goto err;
45 -
46 - if (!debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR,
47 - sc->debug.debugfs_phy, sc, &fops_tx_chainmask))
48 - goto err;
49 -
50 - if (!debugfs_create_file("regidx", S_IRUSR | S_IWUSR,
51 - sc->debug.debugfs_phy, sc, &fops_regidx))
52 - goto err;
53 -
54 - if (!debugfs_create_file("regval", S_IRUSR | S_IWUSR,
55 - sc->debug.debugfs_phy, sc, &fops_regval))
56 - goto err;
57 -
58 - if (!debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR,
59 - sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
60 - goto err;
61 -
62 - if (!debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy,
63 - sc, &fops_regdump))
64 - goto err;
65 -
66 + debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy, sc,
67 + &fops_dma);
68 + debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
69 + &fops_interrupt);
70 + debugfs_create_file("wiphy", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
71 + sc, &fops_wiphy);
72 + debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
73 + &fops_xmit);
74 + debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
75 + &fops_stations);
76 + debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
77 + &fops_misc);
78 + debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy, sc,
79 + &fops_recv);
80 + debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR,
81 + sc->debug.debugfs_phy, sc, &fops_rx_chainmask);
82 + debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR,
83 + sc->debug.debugfs_phy, sc, &fops_tx_chainmask);
84 + debugfs_create_file("regidx", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
85 + sc, &fops_regidx);
86 + debugfs_create_file("regval", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
87 + sc, &fops_regval);
88 + debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR,
89 + sc->debug.debugfs_phy,
90 + &ah->config.cwm_ignore_extcca);
91 + debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy, sc,
92 + &fops_regdump);
93 debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR,
94 sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
95 -
96 debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
97 sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
98 -
99 debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
100 &fops_eeprom);
101
102 sc->debug.regidx = 0;
103 return 0;
104 -err:
105 - debugfs_remove_recursive(sc->debug.debugfs_phy);
106 - sc->debug.debugfs_phy = NULL;
107 - return -ENOMEM;
108 }