lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 11 Mar 2009 09:26:23 -0700
FromGreg KH <>
SubjectRe: [RFC] drivers/base: Add bus_register_notifier_alldev() variant
On Fri, Mar 06, 2009 at 09:10:19AM -0700, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> bus_register_notifier_alldev() is a variation on bus_register_notifier()
> which also triggers the notifier callback for devices already on the bus
> and already bound to drivers.
>
> This function is useful for the case where a driver needs to get a
> reference to a struct device other than the one it is bound to and
> it is not known if the device will be bound before or after this
> function is called. For example, an Ethernet device connected to
> a PHY that is probed separately.

Can't you just walk the list of all devices already on the bus to get
"notified" of them, and then register your notifier handler as well (or
register it first, and then walk the list, which is pretty much what
your patch does)?

I see this api addition as just confusing people as to which one they
should register for :)

thanks,

greg k-h


\
 
 \ /
  Last update: 2009-03-11 17:33    [from the cache]
©2003-2010