patch-2.4.22 linux-2.4.22/arch/mips/au1000/common/prom.c

Next file: linux-2.4.22/arch/mips/au1000/common/puts.c
Previous file: linux-2.4.22/arch/mips/au1000/common/power.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/au1000/common/prom.c linux-2.4.22/arch/mips/au1000/common/prom.c
@@ -105,9 +105,11 @@
 inline unsigned char str2hexnum(unsigned char c)
 {
 	if(c >= '0' && c <= '9')
-	return c - '0';
+		return c - '0';
 	if(c >= 'a' && c <= 'f')
-	return c - 'a' + 10;
+		return c - 'a' + 10;
+	if(c >= 'A' && c <= 'F')
+		return c - 'A' + 10;
 	return 0; /* foo */
 }
 
@@ -128,7 +130,6 @@
 
 int get_ethernet_addr(char *ethernet_addr)
 {
-	int i;
         char *ethaddr_str;
 
         ethaddr_str = prom_getenv("ethaddr");
@@ -139,10 +140,14 @@
 	str2eaddr(ethernet_addr, ethaddr_str);
 
 #if 0
+	{
+		int i;
+
 	printk("get_ethernet_addr: ");
 	for (i=0; i<5; i++)
 		printk("%02x:", (unsigned char)*(ethernet_addr+i));
 	printk("%02x\n", *(ethernet_addr+i));
+	}
 #endif
 
 	return 0;
@@ -151,3 +156,4 @@
 void prom_free_prom_memory (void) {}
 EXPORT_SYMBOL(prom_getcmdline);
 EXPORT_SYMBOL(get_ethernet_addr);
+EXPORT_SYMBOL(str2eaddr);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)