Re: [RFC] sysfs kobject that doesn't trigger hotplug events

From: John Zielinski
Date: Tue May 18 2004 - 23:45:00 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/