Messages in this thread Patch in this message |  | | Date | Mon, 8 Oct 2001 17:28:53 +1000 (EST) | From | brett <> | Subject | [PATCH] Toshiba driver compilation error |
| |
Hey,
The patch to drivers/char/toshiba.c in 2.4.10-ac6 added in an #ifdef that shouldn't be there. It caused the following compilation error when toshiba.c was built in.
gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-ac7/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -c -o drivers/char/toshiba.o drivers/char/toshiba.c
drivers/char/toshiba.c:87: parse error before string constant drivers/char/toshiba.c:87: warning: type defaults to `int' in declaration of `MODULE_PARM' drivers/char/toshiba.c:87: warning: function declaration isn't a prototype drivers/char/toshiba.c:87: warning: data definition has no type or storage classdrivers/char/toshiba.c:89: parse error before string constant drivers/char/toshiba.c:89: warning: type defaults to `int' in declaration of `MODULE_LICENSE' drivers/char/toshiba.c:89: warning: function declaration isn't a prototype drivers/char/toshiba.c:89: warning: data definition has no type or storage classdrivers/char/toshiba.c:98: `THIS_MODULE' undeclared here (not in a function) drivers/char/toshiba.c:98: initializer element is not constant drivers/char/toshiba.c:98: (near initialization for `tosh_fops.owner') make: *** [drivers/char/toshiba.o] Error 1
Of course, the simple solution is
--- drivers/char/toshiba.c~ Mon Oct 8 16:55:23 2001 +++ drivers/char/toshiba.c Sun Oct 7 23:07:23 2001 @@ -56,10 +56,8 @@ #define TOSH_VERSION "1.11 26/9/2001" #define TOSH_DEBUG 0
-#ifdef MODULE #include <linux/module.h> #include <linux/version.h> -#endif #include <linux/kernel.h> #include <linux/sched.h> #include <linux/types.h>
Alan, I think this can safely be applied, as opposed to the patch I gave you on a napkin at LCA last year, which I think you were correct in rejecting :)
thanks,
/ Brett
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |