Skip to contentSkip to conversation

mfd: include linux/module.h for ab5500-core

PATCH In review Axel Lin 4 participants 9 messages Nov 7, 2011 – Nov 14, 2011 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 mfd: include linux/module.h for ab5500-core

Include linux/module.h to fix below build error:

CC drivers/mfd/ab5500-core.o
drivers/mfd/ab5500-core.c:1419: error: 'THIS_MODULE' undeclared here (not in a function) drivers/mfd/ab5500-core.c:1437: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab5500-core.c:1437: warning: data definition has no type or storage class drivers/mfd/ab5500-core.c:1437: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/mfd/ab5500-core.c:1437: warning: function declaration isn't a prototype drivers/mfd/ab5500-core.c:1438: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab5500-core.c:1438: warning: data definition has no type or storage class drivers/mfd/ab5500-core.c:1438: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/mfd/ab5500-core.c:1438: warning: function declaration isn't a prototype drivers/mfd/ab5500-core.c:1439: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab5500-core.c:1439: warning: data definition has no type or storage class drivers/mfd/ab5500-core.c:1439: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/mfd/ab5500-core.c:1439: warning: function declaration isn't a prototype make[2]: *** [drivers/mfd/ab5500-core.o] Error 1
make[1]: *** [drivers/mfd] Error 2
make: *** [drivers] Error 2

---
I got the build error on linux-next 20111104.

 drivers/mfd/ab5500-core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/ab5500-core.c +1 -0
index 4175544..ec10629 100644
@@ -13,6 +13,7 @@
  * TODO: Event handling with irq_chip. Waiting for PRCMU fw support.
  */
 
+#include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 mfd: include linux/module.h for ab5500-debugfs

Include linux/module.h to fix below build error:

CC drivers/mfd/ab5500-debugfs.o
drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function) make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1

---
 drivers/mfd/ab5500-debugfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/ab5500-debugfs.c +1 -0
index 6be1fe6..b7b2d348 100644
@@ -4,6 +4,7 @@
  * Debugfs support for the AB5500 MFD driver
  */
 
+#include <linux/module.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/mfd/ab5500/ab5500.h>
Signature · 1 line
1.7.5.4
#3 lore raw

Re: [PATCH 2/2] mfd: include linux/module.h for ab5500-debugfs

In reply to Axel Lin
Quoted 16 lines · Axel Lin

Include linux/module.h to fix below build error:

CC drivers/mfd/ab5500-debugfs.o
drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function) make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1

---
 drivers/mfd/ab5500-debugfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/ab5500-debugfs.c +0 -0
index 6be1fe6..b7b2d348 100644

drivers/mfd/ab5500-debugfs.c line 7

Quoted 4 lines
drivers/mfd/ab5500-debugfs.c +1 -0
@@ -4,6 +4,7 @@
  * Debugfs support for the AB5500 MFD driver
  */
 
+#include <linux/module.h>

This one looks incorrect. I don't see any uses of MODULE_* or module_* in the file, so I'll make a commit for it to use export.h and retest.

P.

Quoted 3 lines
drivers/mfd/ab5500-debugfs.c +0 -0
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/mfd/ab5500/ab5500.h>
author
#4 lore raw

Re: [PATCH 2/2] mfd: include linux/module.h for ab5500-debugfs

2011/11/8 Paul Gortmaker <[email protected]>:

Quoted 20 lines · Axel Lin
Quoted 19 lines

Include linux/module.h to fix below build error:

  CC      drivers/mfd/ab5500-debugfs.o
drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function) make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1

---
 drivers/mfd/ab5500-debugfs.c |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/ab5500-debugfs.c +0 -0
index 6be1fe6..b7b2d348 100644
@@ -4,6 +4,7 @@
   * Debugfs support for the AB5500 MFD driver
   */
 
Quoted 6 lines

drivers/mfd/ab5500-debugfs.c line 7

Quoted 1 line
drivers/mfd/ab5500-debugfs.c +1 -0
+#include <linux/module.h>

This one looks incorrect.  I don't see any uses of MODULE_* or module_* in the file, so I'll make a commit for it to use export.h and retest.

hi Paul,
drivers/mfd/ab8500-debugfs.c does use MODULE_AUTHOR, MODULE_DESCRIPTION, etc. I got below build error if only includes linux/export.h

CC drivers/mfd/ab8500-debugfs.o
drivers/mfd/ab8500-debugfs.c:632: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab8500-debugfs.c:632: warning: data definition has no type or storage class
drivers/mfd/ab8500-debugfs.c:632: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/mfd/ab8500-debugfs.c:632: warning: function declaration isn't a prototype
drivers/mfd/ab8500-debugfs.c:633: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab8500-debugfs.c:633: warning: data definition has no type or storage class
drivers/mfd/ab8500-debugfs.c:633: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/mfd/ab8500-debugfs.c:633: warning: function declaration isn't a prototype
drivers/mfd/ab8500-debugfs.c:634: error: expected declaration specifiers or '...' before string constant drivers/mfd/ab8500-debugfs.c:634: warning: data definition has no type or storage class
drivers/mfd/ab8500-debugfs.c:634: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/mfd/ab8500-debugfs.c:634: warning: function declaration isn't a prototype
make[2]: *** [drivers/mfd/ab8500-debugfs.o] Error 1 make[1]: *** [drivers/mfd] Error 2
make: *** [drivers] Error 2

Well, I don't know why I don't see these errors when I build the code last time.

Regards,
Axel

author
#5 lore raw

Re: [PATCH 2/2] mfd: include linux/module.h for ab5500-debugfs

2011/11/8 Axel Lin <[email protected]>:

Quoted 27 lines

2011/11/8 Paul Gortmaker <[email protected]>:

Quoted 20 lines · Axel Lin
Quoted 19 lines

Include linux/module.h to fix below build error:

  CC      drivers/mfd/ab5500-debugfs.o
drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function) make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1

---
 drivers/mfd/ab5500-debugfs.c |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mfd/ab5500-debugfs.c +0 -0
index 6be1fe6..b7b2d348 100644
@@ -4,6 +4,7 @@
   * Debugfs support for the AB5500 MFD driver
   */
 
Quoted 6 lines

drivers/mfd/ab5500-debugfs.c line 7

Quoted 1 line
drivers/mfd/ab5500-debugfs.c +1 -0
+#include <linux/module.h>

This one looks incorrect.  I don't see any uses of MODULE_* or module_* in the file, so I'll make a commit for it to use export.h and retest.

Quoted 5 lines

hi Paul,
drivers/mfd/ab8500-debugfs.c does use MODULE_AUTHOR, MODULE_DESCRIPTION, etc. I got below build error if only includes linux/export.h

 CC      drivers/mfd/ab8500-debugfs.o

Ooops. Sorry, I change wrong file. We are talking about ab5500-debugfs.c not ab8500-debugfs.c.

Regards,
Axel

#7 lore raw
In reply to Axel Lin

Hi Axel,

Quoted 1 line · Axel Lin

Include linux/module.h to fix below build error:

Both patches applied, thanks a lot.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#8 lore raw
Quoted 5 lines · Samuel Ortiz

Hi Axel,

Quoted 1 line · Axel Lin

Include linux/module.h to fix below build error:

Both patches applied, thanks a lot.

I can't tell from the above if you mean applied to an mtd specific branch, or mainline, but just to be sure, the fixes are in mainline for about a week now.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=3b8ce3aed986090d9249629f97c53b4dfb8c9783

Thanks,
Paul.

Quoted 4 lines

Cheers,
Samuel.