From akpm@osdl.org Tue Dec 19 22:31:24 2006 Message-Id: <200612192101.kBJL1TMn010276@shell0.pdx.osdl.net> Subject: Driver core: proper prototype for drivers/base/init.c:driver_init() From: Adrian Bunk To: greg@kroah.com Cc: akpm@osdl.org, bunk@stusta.de, hmh@hmh.eng.br Date: Tue, 19 Dec 2006 13:01:28 -0800 From: Adrian Bunk Add a prototype for driver_init() in include/linux/device.h. Also remove a static function of the same name in drivers/acpi/ibm_acpi.c to ibm_acpi_driver_init() to fix the namespace collision. Signed-off-by: Adrian Bunk Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/ibm_acpi.c | 4 ++-- include/linux/device.h | 2 ++ init/main.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) --- gregkh-2.6.orig/drivers/acpi/ibm_acpi.c +++ gregkh-2.6/drivers/acpi/ibm_acpi.c @@ -352,7 +352,7 @@ static char *next_cmd(char **cmds) return start; } -static int driver_init(void) +static int ibm_acpi_driver_init(void) { printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION); printk(IBM_INFO "%s\n", IBM_URL); @@ -1605,7 +1605,7 @@ static int fan_write(char *buf) static struct ibm_struct ibms[] = { { .name = "driver", - .init = driver_init, + .init = ibm_acpi_driver_init, .read = driver_read, }, { --- gregkh-2.6.orig/include/linux/device.h +++ gregkh-2.6/include/linux/device.h @@ -433,6 +433,8 @@ static inline int device_is_registered(s return dev->is_registered; } +void driver_init(void); + /* * High level routines for use by the bus drivers */ --- gregkh-2.6.orig/init/main.c +++ gregkh-2.6/init/main.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -94,7 +95,6 @@ extern void pidmap_init(void); extern void prio_tree_init(void); extern void radix_tree_init(void); extern void free_initmem(void); -extern void driver_init(void); extern void prepare_namespace(void); #ifdef CONFIG_ACPI extern void acpi_early_init(void);