Kaynağa Gözat

[smc9000] Avoid using CONFIG as a preprocessor macro

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 yıl önce
ebeveyn
işleme
3953ddd2ac
2 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. 5
    5
      src/drivers/net/smc9000.c
  2. 1
    1
      src/drivers/net/smc9000.h

+ 5
- 5
src/drivers/net/smc9000.c Dosyayı Görüntüle

@@ -882,7 +882,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
882 882
 
883 883
    /* is it using AUI or 10BaseT ? */
884 884
    SMC_SELECT_BANK(nic->ioaddr, 1);
885
-   if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
885
+   if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
886 886
      media = 2;
887 887
    else
888 888
      media = 1;
@@ -911,12 +911,12 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
911 911
    /* Select which interface to use */
912 912
    SMC_SELECT_BANK(nic->ioaddr, 1);
913 913
    if ( media == 1 ) {
914
-      _outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
915
-	   nic->ioaddr + CONFIG );
914
+      _outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
915
+	   nic->ioaddr + CFG );
916 916
    }
917 917
    else if ( media == 2 ) {
918
-      _outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
919
-	   nic->ioaddr + CONFIG );
918
+      _outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
919
+	   nic->ioaddr + CFG );
920 920
    }
921 921
 
922 922
    smc_phy_configure(nic->ioaddr);

+ 1
- 1
src/drivers/net/smc9000.h Dosyayı Görüntüle

@@ -131,7 +131,7 @@ typedef unsigned long int		dword;
131 131
 #define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
132 132
 
133 133
 /* BANK 1 */
134
-#define CONFIG			0
134
+#define CFG			0
135 135
 #define CFG_AUI_SELECT		0x100
136 136
 #define	BASE			2
137 137
 #define	ADDR0			4

Loading…
İptal
Kaydet