[ltp] Re: Hotswap driver (supports DMA, etc etc)

Jim Duchek linux-thinkpad@linux-thinkpad.org
Tue, 21 Feb 2006 18:46:35 -0600


------=_Part_2165_20566497.1140569195211
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Add '#include <acpi/acpi_bus.h>' before '#include <acpi/acpi_drivers.h> in
lt_hotswap.h

Either that or upgrade to a newer kernel :)  I think that should fix it for
2.6.14 though.


Jim


On 21/02/06, paparoot <paparoot@paparoot.org> wrote:
>
> Damn fuck, it doesn't compile at all, even 0.1.5 version :(
> Advises welcome
>
> duvel lt_hotswap-0.1.6 # make
> make -C /lib/modules/`uname -r`/build SUBDIRS=3D/root/lt_hotswap-0.1.6mod=
ules
> make[1]: Entering directory `/usr/src/linux-2.6.14.2'
>   CC [M]  /root/lt_hotswap-0.1.6/lt_hotswap.o
> In file included from /root/lt_hotswap-0.1.6/lt_hotswap.h:5,
>                  from /root/lt_hotswap-0.1.6/lt_hotswap.c:10:
> include/acpi/acpi_drivers.h:69: warning: `struct acpi_device' declared
> inside
> parameter list
> include/acpi/acpi_drivers.h:69: warning: its scope is only this definitio=
n
> or
> declaration, which is probably not what you want
> include/acpi/acpi_drivers.h:70: warning: `struct acpi_device' declared
> inside
> parameter list
> include/acpi/acpi_drivers.h:72: warning: `struct acpi_device' declared
> inside
> parameter list
> include/acpi/acpi_drivers.h:77: warning: `struct acpi_device' declared
> inside
> parameter list
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_remove_handler':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:164: warning: implicit declaration of
> function `acpi_bus_get_device'
> /root/lt_hotswap-0.1.6/lt_hotswap.c:166: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:167: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_install_handler':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:201: warning: implicit declaration of
> function `acpi_bus_get_status'
> /root/lt_hotswap-0.1.6/lt_hotswap.c:202: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:204: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:205: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:206: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:207: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c: At top level:
> /root/lt_hotswap-0.1.6/lt_hotswap.c:261: warning: `struct acpi_device'
> declared inside parameter list
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_add_device':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:285: warning: implicit declaration of
> function `acpi_bus_add'
> /root/lt_hotswap-0.1.6/lt_hotswap.c:285: error: `ACPI_BUS_TYPE_DEVICE'
> undeclared (first use in this function)
> /root/lt_hotswap-0.1.6/lt_hotswap.c:285: error: (Each undeclared
> identifier is
> reported only once
> /root/lt_hotswap-0.1.6/lt_hotswap.c:285: error: for each function it
> appears
> in.)
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_battery_notify':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:328: warning: passing arg 2 of
> `lths_add_device' from incompatible pointer type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:341: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_ide_notify':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:402: warning: passing arg 2 of
> `lths_add_device' from incompatible pointer type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:425: warning: implicit declaration of
> function `acpi_bus_generate_event'
> /root/lt_hotswap-0.1.6/lt_hotswap.c:432: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:435: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:436: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_floppy_notify':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:459: warning: passing arg 2 of
> `lths_add_device' from incompatible pointer type
> /root/lt_hotswap-0.1.6/lt_hotswap.c:483: error: dereferencing pointer to
> incomplete type
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_setup_proc':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:544: error: `acpi_root_dir' undeclare=
d
> (first use in this function)
> /root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_remove_proc':
> /root/lt_hotswap-0.1.6/lt_hotswap.c:555: error: `acpi_root_dir' undeclare=
d
> (first use in this function)
> make[2]: *** [/root/lt_hotswap-0.1.6/lt_hotswap.o] Error 1
> make[1]: *** [_module_/root/lt_hotswap-0.1.6] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.6.14.2'
> make: *** [default] Error 2
>
> --
> The linux-thinkpad mailing list home page is at:
> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>

------=_Part_2165_20566497.1140569195211
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Add '#include &lt;acpi/acpi_bus.h&gt;' before '#include &lt;acpi/acpi_drive=
rs.h&gt; in lt_hotswap.h<br><br>Either that or upgrade to a newer kernel :)=
&nbsp; I think that should fix it for 2.6.14 though.<br><br><br>Jim<br><br>=
<br>
<div><span class=3D"gmail_quote">On 21/02/06, <b class=3D"gmail_sendername"=
>paparoot</b> &lt;<a href=3D"mailto:paparoot@paparoot.org">paparoot@paparoo=
t.org</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">
Damn fuck, it doesn't compile at all, even 0.1.5 version :(<br>Advises welc=
ome<br><br>duvel lt_hotswap-0.1.6 # make<br>make -C /lib/modules/`uname -r`=
/build SUBDIRS=3D/root/lt_hotswap-0.1.6 modules<br>make[1]: Entering direct=
ory `/usr/src/linux-
<a href=3D"http://2.6.14.2">2.6.14.2</a>'<br>&nbsp;&nbsp;CC [M]&nbsp;&nbsp;=
/root/lt_hotswap-0.1.6/lt_hotswap.o<br>In file included from /root/lt_hotsw=
ap-0.1.6/lt_hotswap.h:5,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /root/lt_hotswap-0.1=
.6/lt_hotswap.c:10:<br>
include/acpi/acpi_drivers.h:69: warning: `struct acpi_device' declared insi=
de<br>parameter list<br>include/acpi/acpi_drivers.h:69: warning: its scope =
is only this definition or<br>declaration, which is probably not what you w=
ant
<br>include/acpi/acpi_drivers.h:70: warning: `struct acpi_device' declared =
inside<br>parameter list<br>include/acpi/acpi_drivers.h:72: warning: `struc=
t acpi_device' declared inside<br>parameter list<br>include/acpi/acpi_drive=
rs.h:77: warning: `struct acpi_device' declared inside
<br>parameter list<br>/root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lth=
s_remove_handler':<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:164: warning: imp=
licit declaration of<br>function `acpi_bus_get_device'<br>/root/lt_hotswap-
0.1.6/lt_hotswap.c:166: error: dereferencing pointer to<br>incomplete type<=
br>/root/lt_hotswap-0.1.6/lt_hotswap.c:167: error: dereferencing pointer to=
<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lt=
hs_install_handler':
<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:201: warning: implicit declaration =
of<br>function `acpi_bus_get_status'<br>/root/lt_hotswap-0.1.6/lt_hotswap.c=
:202: error: dereferencing pointer to<br>incomplete type<br>/root/lt_hotswa=
p-
0.1.6/lt_hotswap.c:204: error: dereferencing pointer to<br>incomplete type<=
br>/root/lt_hotswap-0.1.6/lt_hotswap.c:205: error: dereferencing pointer to=
<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:206: error: dere=
ferencing pointer to
<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:207: error: dere=
ferencing pointer to<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswa=
p.c: At top level:<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:261: warning: `st=
ruct acpi_device'
<br>declared inside parameter list<br>/root/lt_hotswap-0.1.6/lt_hotswap.c: =
In function `lths_add_device':<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:285: =
warning: implicit declaration of<br>function `acpi_bus_add'<br>/root/lt_hot=
swap-
0.1.6/lt_hotswap.c:285: error: `ACPI_BUS_TYPE_DEVICE'<br>undeclared (first =
use in this function)<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:285: error: (E=
ach undeclared identifier is<br>reported only once<br>/root/lt_hotswap-
0.1.6/lt_hotswap.c:285: error: for each function it appears<br>in.)<br>/roo=
t/lt_hotswap-0.1.6/lt_hotswap.c: In function `lths_battery_notify':<br>/roo=
t/lt_hotswap-0.1.6/lt_hotswap.c:328: warning: passing arg 2 of<br>`lths_add=
_device' from incompatible pointer type
<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:341: error: dereferencing pointer t=
o<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c: In function `l=
ths_ide_notify':<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:402: warning: passi=
ng arg 2 of
<br>`lths_add_device' from incompatible pointer type<br>/root/lt_hotswap-0.=
1.6/lt_hotswap.c:425: warning: implicit declaration of<br>function `acpi_bu=
s_generate_event'<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:432: error: derefe=
rencing pointer to
<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:435: error: dere=
ferencing pointer to<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswa=
p.c:436: error: dereferencing pointer to<br>incomplete type<br>/root/lt_hot=
swap-
0.1.6/lt_hotswap.c: In function `lths_floppy_notify':<br>/root/lt_hotswap-0=
.1.6/lt_hotswap.c:459: warning: passing arg 2 of<br>`lths_add_device' from =
incompatible pointer type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:483: error=
: dereferencing pointer to
<br>incomplete type<br>/root/lt_hotswap-0.1.6/lt_hotswap.c: In function `lt=
hs_setup_proc':<br>/root/lt_hotswap-0.1.6/lt_hotswap.c:544: error: `acpi_ro=
ot_dir' undeclared<br>(first use in this function)<br>/root/lt_hotswap-
0.1.6/lt_hotswap.c: In function `lths_remove_proc':<br>/root/lt_hotswap-0.1=
.6/lt_hotswap.c:555: error: `acpi_root_dir' undeclared<br>(first use in thi=
s function)<br>make[2]: *** [/root/lt_hotswap-0.1.6/lt_hotswap.o] Error 1
<br>make[1]: *** [_module_/root/lt_hotswap-0.1.6] Error 2<br>make[1]: Leavi=
ng directory `/usr/src/linux-<a href=3D"http://2.6.14.2">2.6.14.2</a>'<br>m=
ake: *** [default] Error 2<br><br>--<br>The linux-thinkpad mailing list hom=
e page is at:
<br><a href=3D"http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thi=
nkpad">http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad</a=
><br></blockquote></div><br>

------=_Part_2165_20566497.1140569195211--