diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-02-13 20:55:47 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-15 22:14:09 +0100 |
commit | cea90e55969ff70b970d64d564076a5469331527 (patch) | |
tree | 7245d43edb144e1bdd1011aabcf230a875908fef /drivers/net/wireless/rt2x00/rt2800pci.c | |
parent | p54usb: Add usbid for Corega CG-WLUSB2GT. (diff) | |
download | linux-cea90e55969ff70b970d64d564076a5469331527.tar.xz linux-cea90e55969ff70b970d64d564076a5469331527.zip |
rt2x00: Introduce SoC interface type.
Introduce the SoC interface type to detect SoC devices, instead of having
them mimic being PCI devices.
This allows for easier detection of SoC devices.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
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.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index daea0b7c416e..d57531ce1f82 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -1041,18 +1041,12 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) /* * Read EEPROM into buffer */ - switch (rt2x00dev->chip.rt) { - case RT2880: - case RT3052: + if (rt2x00_is_soc(rt2x00dev)) rt2800pci_read_eeprom_soc(rt2x00dev); - break; - default: - if (rt2800pci_efuse_detect(rt2x00dev)) - rt2800pci_read_eeprom_efuse(rt2x00dev); - else - rt2800pci_read_eeprom_pci(rt2x00dev); - break; - } + else if (rt2800pci_efuse_detect(rt2x00dev)) + rt2800pci_read_eeprom_efuse(rt2x00dev); + else + rt2800pci_read_eeprom_pci(rt2x00dev); return rt2800_validate_eeprom(rt2x00dev); } @@ -1103,7 +1097,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) /* * This device requires firmware. */ - if (!rt2x00_rt(rt2x00dev, RT2880) && !rt2x00_rt(rt2x00dev, RT3052)) + if (!rt2x00_is_soc(rt2x00dev)) __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); |