diff mbox

[8/9] rt2800: add eFuse EEPROM support code to rt2800lib

Message ID 200911082025.48707.IvDoorn@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ivo van Doorn Nov. 8, 2009, 7:25 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 6f151d0..b33204d 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -80,20 +80,13 @@  static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token)
 	rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
 }
 
-#ifdef CONFIG_RT2800PCI_WISOC
 static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
 {
 	u32 *base_addr = (u32 *) KSEG1ADDR(0x1F040000); /* XXX for RT3052 */
 
 	memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE);
 }
-#else
-static inline void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
-{
-}
-#endif /* CONFIG_RT2800PCI_WISOC */
 
-#ifdef CONFIG_RT2800PCI_PCI
 static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
 {
 	struct rt2x00_dev *rt2x00dev = eeprom->data;
@@ -145,30 +138,6 @@  static void rt2800pci_read_eeprom_pci(struct rt2x00_dev *rt2x00dev)
 			       EEPROM_SIZE / sizeof(u16));
 }
 
-static int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
-{
-	return rt2800_efuse_detect(rt2x00dev);
-}
-
-static inline void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
-{
-	rt2800_read_eeprom_efuse(rt2x00dev);
-}
-#else
-static inline void rt2800pci_read_eeprom_pci(struct rt2x00_dev *rt2x00dev)
-{
-}
-
-static inline int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
-{
-	return 0;
-}
-
-static inline void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
-{
-}
-#endif /* CONFIG_RT2800PCI_PCI */
-
 /*
  * Firmware functions
  */
@@ -1070,8 +1039,8 @@  static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
 		rt2800pci_read_eeprom_soc(rt2x00dev);
 		break;
 	default:
-		if (rt2800pci_efuse_detect(rt2x00dev))
-			rt2800pci_read_eeprom_efuse(rt2x00dev);
+		if (rt2800_efuse_detect(rt2x00dev))
+			rt2800_read_eeprom_efuse(rt2x00dev);
 		else
 			rt2800pci_read_eeprom_pci(rt2x00dev);
 		break;