[lkml]   [2004]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    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.


    greg k-h
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.025 / U:33.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site