[parisc-linux-cvs] led.c fix to build w/o CONFIG_NET

Helge Deller deller@gmx.de
Sun, 29 Sep 2002 17:48:43 +0200


--Boundary-00=_bDyl90ZDyNmbJ43
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

On Sunday 29 September 2002 05:49 pm, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	02/09/29 09:49:20
>
> Modified files:
> 	arch/parisc/kernel: led.c
> 	arch/parisc/kernel: led.c
>
> Log message:
> fix building kernel without network support



--Boundary-00=_bDyl90ZDyNmbJ43
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="diff"

Index: linux-2.5/arch/parisc/kernel/led.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/led.c,v
retrieving revision 1.3
diff -u -p -r1.3 led.c
--- linux-2.5/arch/parisc/kernel/led.c	20 Jul 2002 16:27:06 -0000	1.3
+++ linux-2.5/arch/parisc/kernel/led.c	29 Sep 2002 15:48:50 -0000
@@ -352,7 +352,8 @@ static void led_LCD_driver(unsigned char
 static unsigned long led_net_rx_counter, led_net_tx_counter;
 
 static void led_get_net_stats(int addvalue)
-{
+{ 
+#ifdef CONFIG_NET
 	static unsigned long rx_total_last, tx_total_last;
 	unsigned long rx_total, tx_total;
 	struct net_device *dev;
@@ -383,6 +384,7 @@ static void led_get_net_stats(int addval
         
 	rx_total_last += rx_total;
         tx_total_last += tx_total;
+#endif
 }
 
 
Index: linux/arch/parisc/kernel/led.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/led.c,v
retrieving revision 1.27
diff -u -p -r1.27 led.c
--- linux/arch/parisc/kernel/led.c	15 Apr 2002 23:40:15 -0000	1.27
+++ linux/arch/parisc/kernel/led.c	29 Sep 2002 15:48:50 -0000
@@ -352,7 +352,8 @@ static void led_LCD_driver(unsigned char
 static unsigned long led_net_rx_counter, led_net_tx_counter;
 
 static void led_get_net_stats(int addvalue)
-{
+{ 
+#ifdef CONFIG_NET
 	static unsigned long rx_total_last, tx_total_last;
 	unsigned long rx_total, tx_total;
 	struct net_device *dev;
@@ -383,6 +384,7 @@ static void led_get_net_stats(int addval
         
 	rx_total_last += rx_total;
         tx_total_last += tx_total;
+#endif
 }
 
 

--Boundary-00=_bDyl90ZDyNmbJ43--