[2.6 patch] proper prototype for drivers/base/init.c:driver_init()
From: Adrian Bunk
Date: Sat Nov 25 2006 - 14:17:59 EST
This patch adds a prototype for driver_init() in include/linux/device.h.
It also removes 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 <bunk@xxxxxxxxx>
---
drivers/acpi/ibm_acpi.c | 4 ++--
include/linux/device.h | 2 ++
init/main.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
--- linux-2.6.19-rc6-mm1/include/linux/device.h.old 2006-11-25 00:03:22.000000000 +0100
+++ linux-2.6.19-rc6-mm1/include/linux/device.h 2006-11-25 00:04:06.000000000 +0100
@@ -432,6 +432,8 @@
return dev->is_registered;
}
+void driver_init(void);
+
/*
* High level routines for use by the bus drivers
*/
--- linux-2.6.19-rc6-mm1/init/main.c.old 2006-11-25 00:05:03.000000000 +0100
+++ linux-2.6.19-rc6-mm1/init/main.c 2006-11-25 00:05:58.000000000 +0100
@@ -52,6 +52,7 @@
#include <linux/debug_locks.h>
#include <linux/lockdep.h>
#include <linux/pid_namespace.h>
+#include <linux/device.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -90,7 +91,6 @@
extern void radix_tree_init(void);
extern void free_initmem(void);
extern void populate_rootfs(void);
-extern void driver_init(void);
extern void prepare_namespace(void);
#ifdef CONFIG_ACPI
extern void acpi_early_init(void);
--- linux-2.6.19-rc6-mm1/drivers/acpi/ibm_acpi.c.old 2006-11-25 00:06:12.000000000 +0100
+++ linux-2.6.19-rc6-mm1/drivers/acpi/ibm_acpi.c 2006-11-25 00:06:37.000000000 +0100
@@ -355,7 +355,7 @@
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);
@@ -1634,7 +1634,7 @@
static struct ibm_struct ibms[] = {
{
.name = "driver",
- .init = driver_init,
+ .init = ibm_acpi_driver_init,
.read = driver_read,
},
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/