scx200_gpio.c doesn't compile in 2.5.50
Subsystems (2)
Compilation of drivers/char/scx200_gpio.c fails in 2.5.50 with the error messages below.
cu
Adrian
<-- snip -->
...
gcc -Wp,-MD,drivers/char/.scx200_gpio.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=k6
-Iarch/i386/mach-generic -nostdinc -iwithprefix include -DKBUILD_BASENAME=scx200_gpio
-DKBUILD_MODNAME=scx200_gpio -c -o drivers/char/scx200_gpio.o drivers/char/scx200_gpio.cdrivers/char/scx200_gpio.c: In function `scx200_gpio_write':drivers/char/scx200_gpio.c:31: warning: implicit declaration of function `minor'drivers/char/scx200_gpio.c:31: dereferencing pointer to incomplete type drivers/char/scx200_gpio.c:34: dereferencing pointer to incomplete type drivers/char/scx200_gpio.c: In function `scx200_gpio_read':drivers/char/scx200_gpio.c:82: dereferencing pointer to incomplete type drivers/char/scx200_gpio.c:85: dereferencing pointer to incomplete type drivers/char/scx200_gpio.c: At top level:drivers/char/scx200_gpio.c:95: warning: `struct inode' declared inside parameter listdrivers/char/scx200_gpio.c:95: warning: its scope is only this definition or declaration, which is probably not what you want. drivers/char/scx200_gpio.c: In function `scx200_gpio_open':drivers/char/scx200_gpio.c:97: dereferencing pointer to incomplete type drivers/char/scx200_gpio.c: At top level:drivers/char/scx200_gpio.c:103: warning: `struct inode' declared inside parameter listdrivers/char/scx200_gpio.c:109: variable scx200_gpio_fops' has initializer but incomplete type drivers/char/scx200_gpio.c:110: unknown field owner' specified in initializerdrivers/char/scx200_gpio.c:110: warning: excess elements in struct initializerdrivers/char/scx200_gpio.c:110: warning: (near initialization for `scx200_gpio_fops')drivers/char/scx200_gpio.c:111: unknown field `write' specified in initializerdrivers/char/scx200_gpio.c:111: warning: excess elements in struct initializerdrivers/char/scx200_gpio.c:111: warning: (near initialization for `scx200_gpio_fops')drivers/char/scx200_gpio.c:112: unknown field `read' specified in initializerdrivers/char/scx200_gpio.c:112: warning: excess elements in struct initializerdrivers/char/scx200_gpio.c:112: warning: (near initialization for `scx200_gpio_fops')drivers/char/scx200_gpio.c:113: unknown field `open' specified in initializerdrivers/char/scx200_gpio.c:113: warning: excess elements in struct initializerdrivers/char/scx200_gpio.c:113: warning: (near initialization for `scx200_gpio_fops')drivers/char/scx200_gpio.c:114: unknown field `release' specified in initializerdrivers/char/scx200_gpio.c:114: warning: excess elements in struct initializerdrivers/char/scx200_gpio.c:114: warning: (near initialization for `scx200_gpio_fops')drivers/char/scx200_gpio.c: In function `scx200_gpio_init':drivers/char/scx200_gpio.c:128: warning: implicit declaration of function `register_chrdev'drivers/char/scx200_gpio.c: In function `scx200_gpio_cleanup':drivers/char/scx200_gpio.c:143: warning: implicit declaration of function `unregister_chrdev'
make[2]: *** [drivers/char/scx200_gpio.o] Error 1
<-- snip -->
Quoted 2 lines · Adrian Bunk
Compilation of
drivers/char/scx200_gpio.cfails in 2.5.50 with the error messages below.
Thanks for the report. Patch follows.
Alan, do you want small fixes like these or should I send them to someone else?
/Christer
drivers/char/scx200_gpio.c renamed from drivers/char/scx200_gpio.c.orig +1 -0
@@ -10,6 +10,7 @@#include <linux/errno.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/fs.h> #include <asm/uaccess.h> #include <asm/io.h>
Signature · 4 lines
"Just how much can I get away with and still go to heaven?" Freelance consultant specializing in device driver programming for Linux Christer Weinigel <[email protected]> http://www.weinigel.se
Em Sat, Nov 30, 2002 at 11:49:39PM +0100, Christer Weinigel escreveu:
Quoted 9 lines
Quoted 2 lines · Adrian Bunk
Compilation of
drivers/char/scx200_gpio.cfails in 2.5.50 with the error messages below.Thanks for the report. Patch follows.
Alan, do you want small fixes like these or should I send them to someone else?
Christer,
I have this one on my misc-2.5 bk tree that I'll be pushing to Linus
RSN. It is also required that we include kdev_t.h, as this driver uses the minor() macro.
- Arnaldo
You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.
===================================================================
[email protected], 2002-11-30 15:44:12-02:00, [email protected]
o scx200_gpio: fix up header cleanups
scx200_gpio.c | 2 ++ 1 files changed, 2 insertions(+)
drivers/char/scx200_gpio.c +2 -0
@@ -8,8 +8,10 @@#include <linux/config.h> #include <linux/module.h> #include <linux/errno.h> +#include <linux/fs.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/kdev_t.h> #include <asm/uaccess.h> #include <asm/io.h>
===================================================================
This BitKeeper patch contains the following changesets:
1.929
## Wrapped with gzip_uu ##
begin 664 bkpatch1194 M'XL(`#-&Z3T``\647V_:,!3%G_&GN!*/$XGOQ2$0C8JUF[:IDXJ8^EP9YT*B MA@39AC(I'WX.F^A6L57[IR5YB'+LDWO/_<E]N'5LLYXV&Q9]>-<XG_5,4[/Q MY5Y'IME$2QN$1=,$(2Z:#<>7UW%9FVJ7LQM0E(@@S[4W!>S9NJR'T?#TQ7_:
M<M9;O'E[^^'50HCI%*X*7:_Y(WN83H5O[%Y7N9MI7U1-'7FK:[=A?_QQ>UK:
MDI04[@33H4Q&+8ZD2EN#.:)6R+DD-1XIT?4P>UK[$Q?$H4057B:M5,EX+%X# M1A.:@*08,1Y*P"13*D,:2,JDA+.F\)A(,4E_-T&KH2!!IPYA.5WZVW99+J M#[#;0L$Z9PNF8EWOMDY<@THF(S%_C%,,?O$20FHI+L4MG2>[>R!R[I<<Q4Y M;G-;=L.,3:%M_$U!D?F2HCRVDI!LAY02M4O#(V*3:EP9GJCE^=B>M>V&DRH* MAC+%T%\'S(_W=3]D^K_S!7;0%<BCV31]UQ11L]P1?^;JV/N-S"P#\<G<#+_ MR0A^@[KW&+(0_:\G"+RLRGIWB%<N*BZ"1F>T^YSW=[[33^>**=C<N]UF.M9$ -B<1$?`;,]'GCR00`````
`
end
Quoted 6 lines · Arnaldo Carvalho de Melo
Em Sat, Nov 30, 2002 at 11:49:39PM +0100, Christer Weinigel escreveu:
Quoted 5 lines
Quoted 2 lines · Adrian Bunk
Compilation of
drivers/char/scx200_gpio.cfails in 2.5.50 with the error messages below.
Quoted 8 lines
Quoted 4 lines
Thanks for the report. Patch follows.
Alan, do you want small fixes like these or should I send them to someone else?
I have this one on my misc-2.5 bk tree that I'll be pushing to Linus
RSN. It is also required that we includekdev_t.h, as this driver uses theminor()macro.
Thanks. Is there any list of what include files one must use to use for example the minor macro? I looked at fs.h and saw that it included kdev_t.h so I skipped including that file myself. But relying on things like that is what bit me to begin with.
/Christer
Signature · 4 lines
"Just how much can I get away with and still go to heaven?" Freelance consultant specializing in device driver programming for Linux Christer Weinigel <[email protected]> http://www.weinigel.se
Em Sun, Dec 01, 2002 at 12:35:29AM +0100, Christer Weinigel escreveu:
Quoted 13 lines
Quoted 11 lines · Arnaldo Carvalho de Melo
Em Sat, Nov 30, 2002 at 11:49:39PM +0100, Christer Weinigel escreveu:
Quoted 9 lines
Quoted 2 lines · Adrian Bunk
Compilation of
drivers/char/scx200_gpio.cfails in 2.5.50 with the error messages below.Thanks for the report. Patch follows.
Alan, do you want small fixes like these or should I send them to someone else?
Quoted 8 lines
Quoted 3 lines
I have this one on my misc-2.5 bk tree that I'll be pushing to Linus
RSN. It is also required that we includekdev_t.h, as this driver uses theminor()macro.Thanks. Is there any list of what include files one must use to use for example the minor macro? I looked at
fs.hand saw that it includedkdev_t.hso I skipped including that file myself. But relying on things like that is what bit me to begin with.
Well, I rather encourage to include the files that have the definition of symbols in the .c file, that way if, taking your example: if fs.h for some reason removed the include kdev_t.h, scx200_gpio.c would stop compiling.
- Arnaldo
Quoted 9 lines · Christer Weinigel
Quoted 2 lines · Adrian Bunk
Compilation of
drivers/char/scx200_gpio.cfails in 2.5.50 with the error messages below.Thanks for the report. Patch follows.
Alan, do you want small fixes like these or should I send them to someone else?
Compile fixes are good to have, especially small ones