[patch] 2.6.8-rc3-mm2: sk98lin/skge.c doesn't compile with PROC_FS=n

Adrian Bunk
2004-08-09T02:17:49Z

I got the following compile error with CONFIG_PROC_FS=n:

<-- snip -->

...
CC drivers/net/sk98lin/skge.o
drivers/net/sk98lin/skge.c: In function `skge_remove_one':
drivers/net/sk98lin/skge.c:5116: warning: implicit declaration of function `remove_proc_entry'
drivers/net/sk98lin/skge.c:5116: `pSkRootDir' undeclared (first use in this function)
drivers/net/sk98lin/skge.c:5116: (Each undeclared identifier is reported only once
drivers/net/sk98lin/skge.c:5116: for each function it appears in.)
drivers/net/sk98lin/skge.c: In function `skge_init':
drivers/net/sk98lin/skge.c:5188: `SK_Root_Dir_entry' undeclared (first use in this function)
make[3]: *** [drivers/net/sk98lin/skge.o] Error 1

<-- snip -->

The fix is pretty straightforward:

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.8-rc3-mm2-full/drivers/net/sk98lin/skge.c.old 2004-08-09 04:11:31.000000000 +0200
+++ linux-2.6.8-rc3-mm2-full/drivers/net/sk98lin/skge.c 2004-08-09 04:13:58.000000000 +0200
@@ -110,10 +110,7 @@

#include <linux/module.h>
#include <linux/init.h>
-
-#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
-#endif

#include "h/skdrv1st.h"
#include "h/skdrv2nd.h"
@@ -5185,9 +5182,9 @@
{
int error;

+#ifdef CONFIG_PROC_FS
memcpy(&SK_Root_Dir_entry, BOOT_STRING, sizeof(SK_Root_Dir_entry) - 1);

-#ifdef CONFIG_PROC_FS
pSkRootDir = proc_mkdir(SK_Root_Dir_entry, proc_net);
if (!pSkRootDir) {
printk(KERN_WARNING "Unable to create /proc/net/%s",