linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Josh Boyer <jwboyer@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/4] Provide VIO modalias
Date: Tue, 23 Feb 2010 12:50:00 +0000	[thread overview]
Message-ID: <1266929400.30247.2585.camel@macbook.infradead.org> (raw)
In-Reply-To: <20100205135354.GI12001@hansolo.jdub.homelinux.org>

On Fri, 2010-02-05 at 08:53 -0500, Josh Boyer wrote:
> Provide a modalias entry for VIO devices in sysfs.  I believe
> this was another initrd generation bugfix for anaconda.
> 
> ---

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Not entirely sure why this didn't get upstream when I first did it;
maybe I just posted it once and then forgot about it?

> diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
> index f988672..12a0851 100644
> --- a/arch/powerpc/kernel/vio.c
> +++ b/arch/powerpc/kernel/vio.c
> @@ -294,9 +294,27 @@ static ssize_t devspec_show(struct device *dev,
>  	return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
>  }
>  
> +static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
> +			     char *buf)
> +{
> +	const struct vio_dev *vio_dev = to_vio_dev(dev);
> +	struct device_node *dn;
> +	const char *cp;
> +
> +	dn = dev->archdata.of_node;
> +	if (!dn)
> +		return -ENODEV;
> +	cp = of_get_property(dn, "compatible", NULL);
> +	if (!cp)
> +		return -ENODEV;
> +
> +	return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp);
> +}
> +
>  static struct device_attribute vio_dev_attrs[] = {
>  	__ATTR_RO(name),
>  	__ATTR_RO(devspec),
> +	__ATTR_RO(modalias),
>  	__ATTR_NULL
>  };
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

  parent reply	other threads:[~2010-02-23 12:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 13:35 [PATCH 0/4] Fedora kernel patch review Josh Boyer
2010-02-05 13:42 ` [PATCH 1/4] Add ps3_storage module alias Josh Boyer
2010-02-05 13:49   ` Geert Uytterhoeven
2010-02-05 14:03     ` Josh Boyer
2010-02-05 14:39       ` Geert Uytterhoeven
2010-02-23 12:47     ` David Woodhouse
2010-02-05 13:52 ` [PATCH 2/4] Fix G5 thermal shutdown Josh Boyer
2010-02-09  0:55   ` Benjamin Herrenschmidt
2010-02-09  2:06     ` Josh Boyer
2010-02-23 12:48     ` David Woodhouse
2010-02-24  2:54       ` Benjamin Herrenschmidt
2010-02-05 13:53 ` [PATCH 0/4] Fedora kernel patch review Josh Boyer
2010-02-05 13:59   ` Josh Boyer
2010-02-23 12:50   ` David Woodhouse [this message]
2010-02-24  0:05     ` [PATCH 3/4] Provide VIO modalias Brian King
2010-02-05 13:55 ` [PATCH 4/4] Fix iMac iSight PCI bridge setup Josh Boyer
2010-02-05 20:57   ` Benjamin Herrenschmidt
2010-02-06  1:03     ` Josh Boyer
2010-02-06  1:48       ` Benjamin Herrenschmidt
2010-02-23 12:50       ` David Woodhouse
2010-02-05 14:04 ` [PATCH 0/4] Fedora kernel patch review Josh Boyer

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=1266929400.30247.2585.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=jwboyer@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).