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

Greg KH
2003-09-20T02:46:59Z

On Sat, Sep 20, 2003 at 02:28:44AM +0100, viro@parcelfarce.linux.theplanet.co.uk 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