Thread (6 messages) flat view 6 messages, 3 authors, 2007-02-19
STALE7127d

[PATCH 2.6.21-rc1] powerpc: Make of_device_uevent() compatible with ibmebus

From: Hoang-Nam Nguyen <hidden>
Date: 2007-02-17 16:24:35
Also in: lkml

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 <redacted>
---


 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))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help