lkml.org 
[lkml]   [2004]   [May]   [19]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateTue, 18 May 2004 22:16:12 -0700
FromGreg KH <>
SubjectRe: [RFC] sysfs kobject that doesn't trigger hotplug events
On Wed, May 19, 2004 at 12:43:47AM -0400, John Zielinski wrote:
> Greg KH wrote:
> 
> >Your patch is not needed at all.  Please read the first comment in the
> >kobject_hotplug() function to see how to prevent kobjects from creating
> >hotplug events.
> > 
> >
> 
> You mean this one?
> 
> /* If this kobj does not belong to a kset, try to find a parent that does */

Oops, sorry, I meant the one in kset_hotplug() which is called by
kobject_hotplug() that says:
		/* If the kset has a filter operation, call it. If it
		 * returns failure, no hotplug event is required. */

> The problem I saw with that is even though my kobject won't have a kset, 
> my kobject's parent (or grandparent) may and I'll trigger that one.  I'm 
> not creating a new device  driver, just extending one so I won't have 
> control over that kobject's lineage.

So why are you creating a kobject, and not just attributes?

> The other way is to create a subsystem using subsytem_init but not to 
> add it to the sysfs tree and then add my kobject to that kset and use 
> the kset's hotplug filter to stop the hotplug events.  This would 
> require extra code and a little bit more memory usage for that kset, but 
> I believe that would work.  Any drawbacks to this method?
> 
> Or am I missing something?

What exactly are you wanting to do?  How about we start there.

thanks,

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

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.367 / U:0.170 seconds]
©2003-2008 Jasper Spaans