summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-10-17 09:42:30 +0200
committerJohn W. Linville <linville@tuxdriver.com>2013-10-18 14:07:00 -0400
commit28d4d98d7ad11b540f0041be9e7d4dae15ca22fa (patch)
tree8c5c78cf81c3c21c9cb5e53af1a40827001c81e9 /drivers/net/wireless/rt2x00/rt2800pci.c
parent6716b3d83221e7aa2623d9a60fdbf7faa836756b (diff)
downloadblackbird-op-linux-28d4d98d7ad11b540f0041be9e7d4dae15ca22fa.tar.gz
blackbird-op-linux-28d4d98d7ad11b540f0041be9e7d4dae15ca22fa.zip
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c19
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)
return retval;
}
-static void rt2800pci_disable_radio(struct rt2x00_dev *rt2x00dev)
-{
- if (rt2x00_is_soc(rt2x00dev)) {
- rt2800_disable_radio(rt2x00dev);
- rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0);
- rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0);
- }
-}
-
#ifdef CONFIG_PCI
static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev,
enum dev_state state)
@@ -280,7 +271,6 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,
* After the radio has been disabled, the device should
* be put to sleep for powersaving.
*/
- rt2800pci_disable_radio(rt2x00dev);
rt2800pci_set_state(rt2x00dev, STATE_SLEEP);
break;
case STATE_RADIO_IRQ_ON:
@@ -480,6 +470,13 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table);
MODULE_LICENSE("GPL");
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
+static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev)
+{
+ rt2800_disable_radio(rt2x00dev);
+ rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0);
+ rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0);
+}
+
static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev,
enum dev_state state)
{
@@ -491,7 +488,7 @@ static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev,
break;
case STATE_RADIO_OFF:
- rt2800pci_disable_radio(rt2x00dev);
+ rt2800soc_disable_radio(rt2x00dev);
break;
case STATE_RADIO_IRQ_ON:
OpenPOWER on IntegriCloud