leds: add missing include of linux/module.h
PATCH 1/1 leds: add missing include of linux/module.h
Quoted 1 line
From
157207e0166b05e33722c1c87bf3753ee22c94faMon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Sun, 21 Aug 2011 22:14:44 +0800
Subject: [PATCH] leds: add missing include of linux/module.h
Add missing include of linux/module.h for drivers that use interfaces from linux/module.h. This patch fixes build errors.
---
below is the build errors for leds-ams-delta.c.
I got similar buld errors for leds-hp6xx.c and leds-renesas-tpu.c.
CC drivers/leds/leds-ams-delta.odrivers/leds/leds-ams-delta.c:116: error: 'THIS_MODULE' undeclared here (not in a function) drivers/leds/leds-ams-delta.c:133: error: expected declaration specifiers or '...' before string constant drivers/leds/leds-ams-delta.c:133: warning: data definition has no type or storage class drivers/leds/leds-ams-delta.c:133: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/leds/leds-ams-delta.c:133: warning: function declaration isn't a prototype drivers/leds/leds-ams-delta.c:134: error: expected declaration specifiers or '...' before string constant drivers/leds/leds-ams-delta.c:134: warning: data definition has no type or storage class drivers/leds/leds-ams-delta.c:134: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/leds/leds-ams-delta.c:134: warning: function declaration isn't a prototype drivers/leds/leds-ams-delta.c:135: error: expected declaration specifiers or '...' before string constant drivers/leds/leds-ams-delta.c:135: warning: data definition has no type or storage class drivers/leds/leds-ams-delta.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/leds/leds-ams-delta.c:135: warning: function declaration isn't a prototype drivers/leds/leds-ams-delta.c:136: error: expected declaration specifiers or '...' before string constant drivers/leds/leds-ams-delta.c:136: warning: data definition has no type or storage class drivers/leds/leds-ams-delta.c:136: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS' drivers/leds/leds-ams-delta.c:136: warning: function declaration isn't a prototype make[2]: *** [drivers/leds/leds-ams-delta.o] Error 1
make[1]: *** [drivers/leds] Error 2
make: *** [drivers] Error 2
drivers/leds/leds-ams-delta.c | 1 + drivers/leds/leds-hp6xx.c | 1 + drivers/leds/leds-renesas-tpu.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/leds/leds-ams-delta.c +1 -0
@@ -8,6 +8,7 @@* published by the Free Software Foundation. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h>
drivers/leds/leds-hp6xx.c +1 -0
@@ -10,6 +10,7 @@* published by the Free Software Foundation. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h>
drivers/leds/leds-renesas-tpu.c +1 -0
@@ -17,6 +17,7 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/module.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/spinlock.h>
Signature · 1 line
1.7.4.1
Quoted 83 lines · Axel Lin
Quoted 1 line
From
157207e0166b05e33722c1c87bf3753ee22c94faMon Sep 17 00:00:00 2001From: Axel Lin <[email protected]>
Date: Sun, 21 Aug 2011 22:14:44 +0800
Subject: [PATCH] leds: add missing include oflinux/module.hAdd missing include of
linux/module.hfor drivers that use interfaces fromlinux/module.h. This patch fixes build errors.Signed-off-by Axel Lin <[email protected]>Cc Jonathan McDowell <[email protected]>Cc Kristoffer Ericson <[email protected]>Cc Magnus Damm <[email protected]>---
below is the build errors forleds-ams-delta.c.
I got similar buld errors forleds-hp6xx.candleds-renesas-tpu.c.CC
drivers/leds/leds-ams-delta.odrivers/leds/leds-ams-delta.c:116: error: 'THIS_MODULE' undeclared here (not in a function)drivers/leds/leds-ams-delta.c:133: error: expected declaration specifiers or '...' before string constantdrivers/leds/leds-ams-delta.c:133: warning: data definition has no type or storage classdrivers/leds/leds-ams-delta.c:133: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'drivers/leds/leds-ams-delta.c:133: warning: function declaration isn't a prototypedrivers/leds/leds-ams-delta.c:134: error: expected declaration specifiers or '...' before string constantdrivers/leds/leds-ams-delta.c:134: warning: data definition has no type or storage classdrivers/leds/leds-ams-delta.c:134: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'drivers/leds/leds-ams-delta.c:134: warning: function declaration isn't a prototypedrivers/leds/leds-ams-delta.c:135: error: expected declaration specifiers or '...' before string constantdrivers/leds/leds-ams-delta.c:135: warning: data definition has no type or storage classdrivers/leds/leds-ams-delta.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'drivers/leds/leds-ams-delta.c:135: warning: function declaration isn't a prototypedrivers/leds/leds-ams-delta.c:136: error: expected declaration specifiers or '...' before string constantdrivers/leds/leds-ams-delta.c:136: warning: data definition has no type or storage classdrivers/leds/leds-ams-delta.c:136: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'drivers/leds/leds-ams-delta.c:136: warning: function declaration isn't a prototype make[2]: *** [drivers/leds/leds-ams-delta.o] Error 1
make[1]: *** [drivers/leds] Error 2
make: *** [drivers] Error 2drivers/leds/leds-ams-delta.c | 1 + drivers/leds/leds-hp6xx.c | 1 + drivers/leds/leds-renesas-tpu.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)drivers/leds/leds-ams-delta.c +1
-0@@ -8,6 +8,7 @@* published by the Free Software Foundation. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> drivers/leds/leds-hp6xx.c +1
-0@@ -10,6 +10,7 @@* published by the Free Software Foundation. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> drivers/leds/leds-renesas-tpu.c +1
-0@@ -17,6 +17,7 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/module.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/spinlock.h> Signature · 1 line
1.7.4.1
Quoted 8 lines · On Sun, 21 Aug 2011 22:20:07 +0800 Axel Lin <[email protected]> wrote:
Add missing include of
linux/module.hfor drivers that use interfaces fromlinux/module.h. This patch fixes build errors....
drivers/leds/leds-ams-delta.c | 1 + drivers/leds/leds-hp6xx.c | 1 + drivers/leds/leds-renesas-tpu.c | 1 +
I'm seeing no leds-renesas-tpu.c in my tree, so whatever tree holds that file will remain unfixed.
Hi Andrew,
Quoted 7 lines · On Mon, 22 Aug 2011 15:12:00 -0700 Andrew Morton <[email protected]>…
Quoted 3 lines · On Sun, 21 Aug 2011 22:20:07 +0800 Axel Lin <[email protected]> wrote:
Add missing include of
linux/module.hfor drivers that use interfaces fromlinux/module.h. This patch fixes build errors.
Quoted 8 lines
Quoted 5 lines
...
drivers/leds/leds-ams-delta.c | 1 + drivers/leds/leds-hp6xx.c | 1 + drivers/leds/leds-renesas-tpu.c | 1 +I'm seeing no
leds-renesas-tpu.cin my tree, so whatever tree holds that file will remain unfixed.
The only place that files exists in linux-next is in the akpm tree in leds-renesas-tpu-led-driver-v2.patch,
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/