[PATCH] create modalias file in sysfs for bus vio

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 23 01:05:05 EST 2008


Hi Olaf,

Thanks for this.  Just a couple of nits ...

On Tue, 22 Jan 2008 09:33:28 +0100 Olaf Hering <olaf at aepfle.de> wrote:
>
> +static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
                               ^
No space here, please.

> +			      char *buf)
> +{
> +	struct device_node *of_node = dev->archdata.of_node;
> +	const char *compat;
> +	int i = 0;
> +
> +	if (of_node) {
> +		compat = of_get_property(of_node, "compatible", &i);
> +		i = sprintf (buf, "vio:T%sS%s\n", of_node->type, compat ? compat : "");
                           ^
Or here.

It would be nice if we could factor out the "vio:T%sS%s" string as it is
also used in vio_hotplug().

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080123/583b4f01/attachment.pgp>


More information about the Linuxppc-dev mailing list