Re: Race free attributes in sysfs

From: Pierre Ossman
Date: Wed May 23 2007 - 01:45:07 EST


Greg KH wrote:
> If you can come up with a wrapper that will work, please let me know and
> I'll be glad to add it. Right now, it's pretty darn simple to do this
> (look at the USB and PCI core code for examples if you need it.)
>
>

I guess we have different views on "simple" :)

I had a look at the usb code, which is why I think the current method is
a bit indirect. Right now I instead copied the function that adds the
device attributes given in the bus_type structure. Couldn't that be used
in a more general manner to get device attribute groups?

> Anyway, groups are what you want and need, please use them and then you
> don't have to worry about triggering an event later after you have
> created your files on your own.
>

I take it I can supply an array of groups somewhere?

--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/