[PATCH] add modalias file for of_devices to sysfs

Olaf Hering olaf at aepfle.de
Tue Apr 3 22:28:59 EST 2007


On Mon, Apr 02, Sylvain Munaut wrote:

> In my patch to "unify" the uevent generation, I've made a separate
> function that generate
> the modalias string especially so that we don't repeat the same piece of
> code twice.
> 
> It's prototype is :
> 
> +static ssize_t of_device_get_modalias(struct of_device *ofdev,
> +					char *str, ssize_t len)
> 
> So the modalias_show can be shortened to
> 
> return of_device_get_modalias(to_of_device(dev), buf, PAGE_SIZE);

macio_sysfs needs to be adapted as well.
Your version does not append a newline to the moalias content.



More information about the Linuxppc-dev mailing list