linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Cc: pmac@au1.ibm.com, fenkes@de.ibm.com,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	paulus@samba.org, johnrose@us.ibm.com
Subject: Re: [PATCH 2.6.21-rc1] powerpc: Make of_device_uevent() compatible with ibmebus
Date: Sun, 18 Feb 2007 08:56:39 +1100	[thread overview]
Message-ID: <1171749399.5644.145.camel@localhost.localdomain> (raw)
In-Reply-To: <200702171728.15597.hnguyen@linux.vnet.ibm.com>

On Sat, 2007-02-17 at 17:28 +0100, Hoang-Nam Nguyen wrote:
> ibmebus has a fake root device that's not associated with an ofdt node.
> Filter out any such devices in of_device_uevent().

Doh ! You are creating an of_device with no attached device-node ? That
is totally evil ! Why do you need that ?

Ben.

> 
> 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))
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2007-02-17 22:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1171749399.5644.145.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=fenkes@de.ibm.com \
    --cc=hnguyen@linux.vnet.ibm.com \
    --cc=johnrose@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=pmac@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).