Skip to content

Commit 120d200

Browse files
Luis Henriquesmpe
authored andcommitted
macintosh/ans-lcd: fix build failure after module_init/exit relocation
After commit 0fd972a ("module: relocate module_init from init.h to module.h") ans-lcd module fails to build with: drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class [enabled by default] module_init(anslcd_init); ^ drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] drivers/macintosh/ans-lcd.c:201:1: warning: parameter names (without types) in function declaration [enabled by default] drivers/macintosh/ans-lcd.c:202:1: warning: data definition has no type or storage class [enabled by default] module_exit(anslcd_exit); ^ drivers/macintosh/ans-lcd.c:202:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int] drivers/macintosh/ans-lcd.c:202:1: warning: parameter names (without types) in function declaration [enabled by default] drivers/macintosh/ans-lcd.c:155:1: warning: 'anslcd_init' defined but not used [-Wunused-function] anslcd_init(void) ^ drivers/macintosh/ans-lcd.c:195:1: warning: 'anslcd_exit' defined but not used [-Wunused-function] anslcd_exit(void) ^ This commit fixes it by replacing linux/init.h by linux/module.h. Fixes: 0fd972a ("module: relocate module_init from init.h to module.h") Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 3ba3a73 commit 120d200

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/macintosh/ans-lcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <linux/kernel.h>
88
#include <linux/miscdevice.h>
99
#include <linux/fcntl.h>
10-
#include <linux/init.h>
10+
#include <linux/module.h>
1111
#include <linux/delay.h>
1212
#include <linux/fs.h>
1313

0 commit comments

Comments
 (0)