Re: [PATCH] RFC: Attributes in /sys/cdev

From: Greg KH
Date: Fri Sep 19 2003 - 21:50:19 EST


On Sat, Sep 20, 2003 at 02:28:44AM +0100, viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
>
> BTW, I suspect that we need a way to say "this kobject and its children
> will *never* have any attributes and will never be seen in sysfs". There
> are quite a few uses when we keep kobject as a refcounting vehicle, etc.,
> but have nothing meaningful to show in sysfs tree. Keep in mind that
> sysfs nodes (including attributes) are not free - it's struct inode +
> struct dentry at the very least. Both pinned down and permanently mapped...

Hm, I've used them this way by just calling kobject_init, kobject_get
and kobject_put. As long as you never call kobject_register or
kobject_add, the sysfs hookups never happen.

Is that what you are looking for?

thanks,

greg k-h
-
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/