Re: [RFC] New kobject/kset/ktype documentation and example code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Cornelia Huck <cornelia.huck@...>
Cc: Greg KH <greg@...>, <linux-kernel@...>, Alan Stern <stern@...>, Jonathan Corbet <corbet@...>, Randy Dunlap <randy.dunlap@...>
Date: Wednesday, November 28, 2007 - 12:36 pm

On Wed, 2007-11-28 at 17:12 +0100, Cornelia Huck wrote:

The driver core does use the split already in most places, I did that
long ago. There are not too many (~20) users of kobject_register(), and
it's a pretty straight-forward change to change that to _init, _add,
_uevent, and get rid of that totally useless "convenience api".

I think there is no longer any excuse to keep that broken code around,
and even require to document that it's broken. The whole purpose of the
uevent is userspace consumption, which just doesn't work correctly with
the code we offer. The fix is trivial, and should be done now, and we no
longer need to fiddle around timing issues, just because we are too
lazy.

I propose the removal of _all_ funtions that have *register* in their
name, and always require the following sequence:
  _init()
  _add()
  _uevent(_ADD)

  _uevent(_REMOVE)
  _del()
  _put()

The _create_and_register() functions would become  _create_ and_add()
and will need an additional _uevent() call after they populated the
object.

Thanks,
Kay

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kobject_init rewrite, Greg KH, (Thu Nov 29, 5:53 pm)
Re: kobject_init rewrite, Alan Stern, (Thu Nov 29, 6:16 pm)
Re: kobject_init rewrite, Greg KH, (Thu Nov 29, 6:24 pm)
Re: kobject_init rewrite, Greg KH, (Thu Nov 29, 5:54 pm)
Re: kobject_init rewrite, Cornelia Huck, (Fri Nov 30, 5:31 am)
Re: [RFC] New kobject/kset/ktype documentation and example c..., Kay Sievers, (Wed Nov 28, 12:36 pm)
[RFC] Sample kset/ktype/kobject implementation, Greg KH, (Tue Nov 27, 7:04 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Cornelia Huck, (Wed Nov 28, 12:35 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Cornelia Huck, (Thu Nov 29, 5:39 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Alan Stern, (Thu Nov 29, 6:11 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Dave Young, (Fri Nov 30, 1:07 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Alan Stern, (Fri Nov 30, 10:51 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Dave Young, (Fri Nov 30, 1:57 am)
[RFC] sample kobject implementation, Greg KH, (Tue Nov 27, 7:03 pm)