linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.21-rc1] powerpc: Make of_device_uevent() compatible with ibmebus
@ 2007-02-17 16:28 Hoang-Nam Nguyen
  2007-02-17 21:56 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Hoang-Nam Nguyen @ 2007-02-17 16:28 UTC (permalink / raw)
  To: paulus, linuxppc-dev, linux-kernel, johnrose, Sylvain Munaut; +Cc: fenkes, pmac

ibmebus has a fake root device that's not associated with an ofdt node.
Filter out any such devices in of_device_uevent().


Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
---


 of_device.c |    4 ++++
 1 files changed, 4 insertions(+)


diff -urp a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
--- a/arch/powerpc/kernel/of_device.c	2007-02-17 16:36:32.116368480 +0100
+++ b/arch/powerpc/kernel/of_device.c	2007-02-17 16:44:01.319366352 +0100
@@ -180,6 +180,10 @@ int of_device_uevent(struct device *dev,
 
 	ofdev = to_of_device(dev);
 
+	/* e.g. ibmebus has a fake root device w/o ofdt node -- filter that */
+	if (!ofdev->node)
+		return -ENODEV;
+
 	if (add_uevent_var(envp, num_envp, &i,
 			   buffer, buffer_size, &length,
 			   "OF_NAME=%s", ofdev->node->name))

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

end of thread, other threads:[~2007-02-19 20:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-17 16:28 [PATCH 2.6.21-rc1] powerpc: Make of_device_uevent() compatible with ibmebus Hoang-Nam Nguyen
2007-02-17 21:56 ` Benjamin Herrenschmidt
2007-02-18  0:21   ` Joachim Fenkes
2007-02-18  0:37     ` Benjamin Herrenschmidt
2007-02-19 16:36       ` Joachim Fenkes
2007-02-19 19:47         ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).