LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Toshiba driver compilation error
@ 2001-10-08  7:28 brett
  0 siblings, 0 replies; only message in thread
From: brett @ 2001-10-08  7:28 UTC (permalink / raw)
  To: linux-kernel


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-08  7:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-08  7:28 [PATCH] Toshiba driver compilation error brett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).