public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] proper prototype for drivers/base/init.c:driver_init()
@ 2006-11-25 19:16 Adrian Bunk
  2006-11-25 21:40 ` Henrique de Moraes Holschuh
  2006-11-25 22:31 ` Henrique de Moraes Holschuh
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-11-25 19:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, ibm-acpi, len.brown, linux-acpi

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@stusta.de>

---

 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,
 	 },
 	{


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6 patch] proper prototype for drivers/base/init.c:driver_init()
  2006-11-25 19:16 Adrian Bunk
@ 2006-11-25 21:40 ` Henrique de Moraes Holschuh
  2006-11-25 22:31 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 4+ messages in thread
From: Henrique de Moraes Holschuh @ 2006-11-25 21:40 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Greg Kroah-Hartman, linux-kernel, ibm-acpi, len.brown, linux-acpi

On Sat, 25 Nov 2006, Adrian Bunk wrote:
> 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.

I might as well fix the entire ibm-acpi driver so that it doesn't have any
more issues like this in the future.

I will prepare a patch.  I never liked namespace-pollution-prone symbols,
anyway.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6 patch] proper prototype for drivers/base/init.c:driver_init()
  2006-11-25 19:16 Adrian Bunk
  2006-11-25 21:40 ` Henrique de Moraes Holschuh
@ 2006-11-25 22:31 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 4+ messages in thread
From: Henrique de Moraes Holschuh @ 2006-11-25 22:31 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Greg Kroah-Hartman, linux-kernel, len.brown, linux-acpi

On Sat, 25 Nov 2006, Adrian Bunk wrote:
> 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@stusta.de>

ACK for the proposed ibm-acpi changes (I can't speak for driver_init).  A
full namespace cleanup in ibm-acpi will touch pretty much every function in
the ibm-acpi driver, so it will have to wait until a bunch of patches that I
just submitted for acpi-test are either merged or rejected.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [2.6 patch] proper prototype for drivers/base/init.c:driver_init()
@ 2006-12-12 16:22 Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-12-12 16:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Greg Kroah-Hartman, linux-kernel, ibm-acpi, len.brown, linux-acpi,
	Henrique de Moraes Holschuh

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@stusta.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

---

 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,8 +52,9 @@
 #include <linux/debug_locks.h>
 #include <linux/lockdep.h>
 #include <linux/utsrelease.h>
 #include <linux/pid_namespace.h>
 #include <linux/compile.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,
 	 },
 	{


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-12 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 16:22 [2.6 patch] proper prototype for drivers/base/init.c:driver_init() Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-11-25 19:16 Adrian Bunk
2006-11-25 21:40 ` Henrique de Moraes Holschuh
2006-11-25 22:31 ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox