Re: Sysfs - export sysfs_create_subdir?
From: Greg KH
Date: Sat Jul 23 2011 - 23:21:47 EST
On Fri, Jul 22, 2011 at 06:43:13PM +0100, Jonathan Cameron wrote:
> Hi All,
> I have a couple of cases in IIO where under some conditions
> we end up using dummy attr_groups (no elements) to initialize
> a sub directory before dynamically creating all of its attributes.
Ick, you really shouldn't do that.
> Now having dummy groups in the IIO core is fine, but it does seem
> a little messy.
> The obvious choice would be to put together a small wrapper function
> for sysfs_create_subdir that also does sysfs_get on the result.
That's why that function is not exported. Creating subdirectories in
sysfs is not a good idea, udev doesn't like it, and you don't get
userspace notification for it very well either.
What specifically are you trying to do in sysfs that you are needing
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/