]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[smc9000] Avoid using CONFIG as a preprocessor macro
authorMichael Brown <mcb30@ipxe.org>
Tue, 19 Aug 2014 13:38:27 +0000 (14:38 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 19 Aug 2014 13:38:27 +0000 (14:38 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/smc9000.c
src/drivers/net/smc9000.h

index 31e418a97be34f1d9001e9c201d72c291cae7aef..c9762d580eab42ccc80624b9186b5629b6d1cef4 100644 (file)
@@ -882,7 +882,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
 
    /* is it using AUI or 10BaseT ? */
    SMC_SELECT_BANK(nic->ioaddr, 1);
-   if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
+   if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
      media = 2;
    else
      media = 1;
@@ -911,12 +911,12 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
    /* Select which interface to use */
    SMC_SELECT_BANK(nic->ioaddr, 1);
    if ( media == 1 ) {
-      _outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
-          nic->ioaddr + CONFIG );
+      _outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
+          nic->ioaddr + CFG );
    }
    else if ( media == 2 ) {
-      _outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
-          nic->ioaddr + CONFIG );
+      _outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
+          nic->ioaddr + CFG );
    }
 
    smc_phy_configure(nic->ioaddr);
index 02b1c831c45b4cd8f9f07de94c5b1c096dd37c9d..8e655f08d52b37ad7d464c59951870ddf1b56f23 100644 (file)
@@ -131,7 +131,7 @@ typedef unsigned long int           dword;
 #define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
 
 /* BANK 1 */
-#define CONFIG                 0
+#define CFG                    0
 #define CFG_AUI_SELECT         0x100
 #define        BASE                    2
 #define        ADDR0                   4