lkml.org 
[lkml]   [2004]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] sysfs kobject that doesn't trigger hotplug events
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 */

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.

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?

John


-
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 14:03    [W:0.047 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site