diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-10-17 03:42:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 14:07:00 -0400 |
commit | 28d4d98d7ad11b540f0041be9e7d4dae15ca22fa (patch) | |
tree | 8c5c78cf81c3c21c9cb5e53af1a40827001c81e9 | |
parent | 6716b3d83221e7aa2623d9a60fdbf7faa836756b (diff) |
rt2x00: rt2800pci: rename rt2800pci_disable_radio function
The function contain code for SoC devices only.
Rename the function to 'rt2800soc_disable_radio'
and move it to the SoC specific section. Use
the renamed function in the SoC specific code
only and remove the 'if rt2x00_is_soc(rt2x00dev)'
condition from the function body.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index e424b7ad5173..4cfd8f77fa71 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -237,15 +237,6 @@ static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
237 | return retval; | 237 | return retval; |
238 | } | 238 | } |
239 | 239 | ||
240 | static void rt2800pci_disable_radio(struct rt2x00_dev *rt2x00dev) | ||
241 | { | ||
242 | if (rt2x00_is_soc(rt2x00dev)) { | ||
243 | rt2800_disable_radio(rt2x00dev); | ||
244 | rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0); | ||
245 | rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | #ifdef CONFIG_PCI | 240 | #ifdef CONFIG_PCI |
250 | static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev, | 241 | static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev, |
251 | enum dev_state state) | 242 | enum dev_state state) |
@@ -280,7 +271,6 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
280 | * After the radio has been disabled, the device should | 271 | * After the radio has been disabled, the device should |
281 | * be put to sleep for powersaving. | 272 | * be put to sleep for powersaving. |
282 | */ | 273 | */ |
283 | rt2800pci_disable_radio(rt2x00dev); | ||
284 | rt2800pci_set_state(rt2x00dev, STATE_SLEEP); | 274 | rt2800pci_set_state(rt2x00dev, STATE_SLEEP); |
285 | break; | 275 | break; |
286 | case STATE_RADIO_IRQ_ON: | 276 | case STATE_RADIO_IRQ_ON: |
@@ -480,6 +470,13 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table); | |||
480 | MODULE_LICENSE("GPL"); | 470 | MODULE_LICENSE("GPL"); |
481 | 471 | ||
482 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) | 472 | #if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X) |
473 | static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev) | ||
474 | { | ||
475 | rt2800_disable_radio(rt2x00dev); | ||
476 | rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0); | ||
477 | rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0); | ||
478 | } | ||
479 | |||
483 | static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev, | 480 | static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev, |
484 | enum dev_state state) | 481 | enum dev_state state) |
485 | { | 482 | { |
@@ -491,7 +488,7 @@ static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
491 | break; | 488 | break; |
492 | 489 | ||
493 | case STATE_RADIO_OFF: | 490 | case STATE_RADIO_OFF: |
494 | rt2800pci_disable_radio(rt2x00dev); | 491 | rt2800soc_disable_radio(rt2x00dev); |
495 | break; | 492 | break; |
496 | 493 | ||
497 | case STATE_RADIO_IRQ_ON: | 494 | case STATE_RADIO_IRQ_ON: |