* [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly @ 2013-02-16 18:16 Andrea Adami 2013-02-16 23:00 ` Anton Vorontsov 0 siblings, 1 reply; 4+ messages in thread From: Andrea Adami @ 2013-02-16 18:16 UTC (permalink / raw) To: linux-arm-kernel Initial try to fix compilation error linux/include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type linux/include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type linux/include/linux/mfd/ucb1x00.h:137:17: error: field 'dev' has incomplete type linux/drivers/power/collie_battery.c:290:56: error: unknown type name 'pm_message_t' linux/drivers/power/collie_battery.c:371:13: error: 'collie_bat_suspend' undeclared here (not in a function) | make[4]: *** [drivers/power/collie_battery.o] Error 1 | make[3]: *** [drivers/power] Error 2 As seen in Arnd Bergmann patches on LAKML [PATCH 7/9] ARM defconfigs: add missing inclusions of linux/platform_device.h [PATCH 1/9] ARM: sa1100/assabet: include platform_device.h directly Compilation is still not clean, two warnings: linux/drivers/power/collie_battery.c:372:2: warning: initialization from incompatible pointer type [enabled by default] linux/drivers/power/collie_battery.c:372:2: warning: (near initialization for 'collie_bat_driver.suspend') [enabled by default] Signed-off-by: Andrea Adami <andrea.adami@gmail.com> --- drivers/power/collie_battery.c | 1 + drivers/video/logo/logo_linux_clut224.ppm | 232006 ++++++++++++++++++++++++++- 2 files changed, 230404 insertions(+), 1603 deletions(-) diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c index c58d0e3..52cbab3 100644 --- a/drivers/power/collie_battery.c +++ b/drivers/power/collie_battery.c @@ -14,6 +14,7 @@ #include <linux/module.h> #include <linux/power_supply.h> #include <linux/delay.h> +#include <linux/platform_device.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/gpio.h> -- 1.7.12.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly 2013-02-16 18:16 [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly Andrea Adami @ 2013-02-16 23:00 ` Anton Vorontsov 2013-02-18 0:13 ` Andrea Adami 0 siblings, 1 reply; 4+ messages in thread From: Anton Vorontsov @ 2013-02-16 23:00 UTC (permalink / raw) To: linux-arm-kernel Hi Andrea, On Sat, Feb 16, 2013 at 07:16:00PM +0100, Andrea Adami wrote: > Initial try to fix compilation error Things are a bit more complex... > linux/include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type You have to add #include <linux/device.h> into mfd/mcp.h. This will add struct device and... > linux/include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type struct device_driver. > linux/include/linux/mfd/ucb1x00.h:137:17: error: field 'dev' has incomplete type Same here, the file ucb1x00.h needs #include <linux/device.h>. > linux/drivers/power/collie_battery.c:290:56: error: unknown type name 'pm_message_t' #include <linux/pm.h> into collie_battery.c Thanks, Anton > linux/drivers/power/collie_battery.c:371:13: error: 'collie_bat_suspend' undeclared here (not in a function) > | make[4]: *** [drivers/power/collie_battery.o] Error 1 > | make[3]: *** [drivers/power] Error 2 > > As seen in Arnd Bergmann patches on LAKML > [PATCH 7/9] ARM defconfigs: add missing inclusions of linux/platform_device.h > [PATCH 1/9] ARM: sa1100/assabet: include platform_device.h directly > > Compilation is still not clean, two warnings: > linux/drivers/power/collie_battery.c:372:2: warning: initialization from incompatible pointer type [enabled by default] > linux/drivers/power/collie_battery.c:372:2: warning: (near initialization for 'collie_bat_driver.suspend') [enabled by default] > > Signed-off-by: Andrea Adami <andrea.adami@gmail.com> > --- > drivers/power/collie_battery.c | 1 + > drivers/video/logo/logo_linux_clut224.ppm | 232006 ++++++++++++++++++++++++++- > 2 files changed, 230404 insertions(+), 1603 deletions(-) > > diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c > index c58d0e3..52cbab3 100644 > --- a/drivers/power/collie_battery.c > +++ b/drivers/power/collie_battery.c > @@ -14,6 +14,7 @@ > #include <linux/module.h> > #include <linux/power_supply.h> > #include <linux/delay.h> > +#include <linux/platform_device.h> I don't see anywhere in the driver which would need platform_device.h... But pm.h, yes. > #include <linux/spinlock.h> > #include <linux/interrupt.h> > #include <linux/gpio.h> > -- > 1.7.12.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly 2013-02-16 23:00 ` Anton Vorontsov @ 2013-02-18 0:13 ` Andrea Adami 2013-02-18 1:02 ` Anton Vorontsov 0 siblings, 1 reply; 4+ messages in thread From: Andrea Adami @ 2013-02-18 0:13 UTC (permalink / raw) To: linux-arm-kernel On Sun, Feb 17, 2013 at 12:00 AM, Anton Vorontsov <anton@enomsg.org> wrote: > Hi Andrea, > > On Sat, Feb 16, 2013 at 07:16:00PM +0100, Andrea Adami wrote: >> Initial try to fix compilation error > > Things are a bit more complex... > >> linux/include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type > > You have to add #include <linux/device.h> into mfd/mcp.h. This will add > struct device and... > Bingo.Adding it solves all following errors, no need for further inclusions. >> linux/include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type > > struct device_driver. > >> linux/include/linux/mfd/ucb1x00.h:137:17: error: field 'dev' has incomplete type > > Same here, the file ucb1x00.h needs #include <linux/device.h>. > Seems not needed, mcp.h is included by ucb1x00.h >> linux/drivers/power/collie_battery.c:290:56: error: unknown type name 'pm_message_t' > > #include <linux/pm.h> into collie_battery.c > Seems not needed, is included in mcp-sa11x0.c (included by collie_battery.c) The warning remains, though: linux/drivers/power/collie_battery.c:372:2: warning: initialization from incompatible pointer type [enabled by default] > Thanks, > > Anton > Thank you for your attention Regards Andrea Thanks >> linux/drivers/power/collie_battery.c:371:13: error: 'collie_bat_suspend' undeclared here (not in a function) >> | make[4]: *** [drivers/power/collie_battery.o] Error 1 >> | make[3]: *** [drivers/power] Error 2 >> >> As seen in Arnd Bergmann patches on LAKML >> [PATCH 7/9] ARM defconfigs: add missing inclusions of linux/platform_device.h >> [PATCH 1/9] ARM: sa1100/assabet: include platform_device.h directly >> >> Compilation is still not clean, two warnings: >> linux/drivers/power/collie_battery.c:372:2: warning: initialization from incompatible pointer type [enabled by default] >> linux/drivers/power/collie_battery.c:372:2: warning: (near initialization for 'collie_bat_driver.suspend') [enabled by default] >> >> Signed-off-by: Andrea Adami <andrea.adami@gmail.com> >> --- >> drivers/power/collie_battery.c | 1 + >> drivers/video/logo/logo_linux_clut224.ppm | 232006 ++++++++++++++++++++++++++- >> 2 files changed, 230404 insertions(+), 1603 deletions(-) >> >> diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c >> index c58d0e3..52cbab3 100644 >> --- a/drivers/power/collie_battery.c >> +++ b/drivers/power/collie_battery.c >> @@ -14,6 +14,7 @@ >> #include <linux/module.h> >> #include <linux/power_supply.h> >> #include <linux/delay.h> >> +#include <linux/platform_device.h> > > I don't see anywhere in the driver which would need platform_device.h... > But pm.h, yes. > Sorry, I'm not a kernel developer. It was a desperate try to unbrick build. I'm just maintaining the layer needed to build Zaurus images using Yocto toolchain. Up to now, I could only build a working linux-as-bootloader kernel (kexecboot) for collie with old 2.6.31+ sources: userspace is not a problem now but the poor device is suffering some serious bitrot :/ >> #include <linux/spinlock.h> >> #include <linux/interrupt.h> >> #include <linux/gpio.h> >> -- >> 1.7.12.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly 2013-02-18 0:13 ` Andrea Adami @ 2013-02-18 1:02 ` Anton Vorontsov 0 siblings, 0 replies; 4+ messages in thread From: Anton Vorontsov @ 2013-02-18 1:02 UTC (permalink / raw) To: linux-arm-kernel On Mon, Feb 18, 2013 at 01:13:46AM +0100, Andrea Adami wrote: > On Sun, Feb 17, 2013 at 12:00 AM, Anton Vorontsov <anton@enomsg.org> wrote: > > Hi Andrea, > > > > On Sat, Feb 16, 2013 at 07:16:00PM +0100, Andrea Adami wrote: > >> Initial try to fix compilation error > > > > Things are a bit more complex... > > > >> linux/include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type > > > > You have to add #include <linux/device.h> into mfd/mcp.h. This will add > > struct device and... > > > Bingo.Adding it solves all following errors, no need for further inclusions. > > >> linux/include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type > > > > struct device_driver. > > > >> linux/include/linux/mfd/ucb1x00.h:137:17: error: field 'dev' has incomplete type > > > > Same here, the file ucb1x00.h needs #include <linux/device.h>. > > > Seems not needed, mcp.h is included by ucb1x00.h Generally, we don't depend on indirect inclusions. But if it doesn't harm anyhow so far, we may not bother with this. Thanks, Anton ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-18 1:02 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-16 18:16 [RFC] ARM: sa1100: collie-battery.c: include platform_device.h directly Andrea Adami 2013-02-16 23:00 ` Anton Vorontsov 2013-02-18 0:13 ` Andrea Adami 2013-02-18 1:02 ` Anton Vorontsov
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).