diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-09-25 14:55:39 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:53:03 -0400 |
commit | 066cb637b1b562bebd09d237bfaaca6724f247e5 (patch) | |
tree | 340b3902e69246cb73e820bbd9994bd1bdcca402 /drivers/net/wireless/rt2x00/rt2x00rfkill.c | |
parent | 12dadb9009723dd0512091643e6e403f9e1b25cb (diff) |
[PATCH] rt2x00: Reorganize rt2x00dev->flags
The rt2x00dev->flags has become a chaos over time,
this will reorganize the flags by renaming, deleting, adding
and properly implement the flags.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00rfkill.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00rfkill.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00rfkill.c b/drivers/net/wireless/rt2x00/rt2x00rfkill.c index b54457c921c5..06af01451cde 100644 --- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c +++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c | |||
@@ -45,9 +45,9 @@ static int rt2x00rfkill_toggle_radio(void *data, enum rfkill_state state) | |||
45 | return 0; | 45 | return 0; |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Only continue if we have an active interface. | 48 | * Only continue if there are enabled interfaces. |
49 | */ | 49 | */ |
50 | if (!is_interface_present(&rt2x00dev->interface)) | 50 | if (!test_bit(DEVICE_STARTED, &rt2x00dev->flags)) |
51 | return 0; | 51 | return 0; |
52 | 52 | ||
53 | if (state == RFKILL_STATE_ON) { | 53 | if (state == RFKILL_STATE_ON) { |
@@ -76,7 +76,7 @@ int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | |||
76 | { | 76 | { |
77 | int retval; | 77 | int retval; |
78 | 78 | ||
79 | if (!test_bit(DEVICE_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | 79 | if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) |
80 | return 0; | 80 | return 0; |
81 | 81 | ||
82 | retval = rfkill_register(rt2x00dev->rfkill); | 82 | retval = rfkill_register(rt2x00dev->rfkill); |
@@ -97,7 +97,7 @@ int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | |||
97 | 97 | ||
98 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) | 98 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) |
99 | { | 99 | { |
100 | if (!test_bit(DEVICE_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | 100 | if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) |
101 | return; | 101 | return; |
102 | 102 | ||
103 | input_unregister_polled_device(rt2x00dev->poll_dev); | 103 | input_unregister_polled_device(rt2x00dev->poll_dev); |
@@ -108,7 +108,7 @@ int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | |||
108 | { | 108 | { |
109 | struct device *device = wiphy_dev(rt2x00dev->hw->wiphy); | 109 | struct device *device = wiphy_dev(rt2x00dev->hw->wiphy); |
110 | 110 | ||
111 | if (!test_bit(DEVICE_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | 111 | if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) |
112 | return 0; | 112 | return 0; |
113 | 113 | ||
114 | rt2x00dev->rfkill = rfkill_allocate(device, RFKILL_TYPE_WLAN); | 114 | rt2x00dev->rfkill = rfkill_allocate(device, RFKILL_TYPE_WLAN); |
@@ -138,7 +138,7 @@ int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | |||
138 | 138 | ||
139 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) | 139 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) |
140 | { | 140 | { |
141 | if (!test_bit(DEVICE_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | 141 | if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) |
142 | return; | 142 | return; |
143 | 143 | ||
144 | input_free_polled_device(rt2x00dev->poll_dev); | 144 | input_free_polled_device(rt2x00dev->poll_dev); |