tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: introduce device_is_attached()

On Apr 16, 2012, at 9:52 AM, Christoph Egger wrote:

> Hi,
> I want to introduce a new function to sys/devices.h:
> bool device_is_attached(device_t parent, cfdata_t cf);

I'd prefer device_is_attached_p

> The purpose is for bus drivers who wants to attach children
> and ensure that only one instance of it will attach.
> 'parent' is the bus driver and 'cf' is the child device
> as passed to the submatch callback via config_search_loc().
> The return value is true if the child is already attached.

Can it be used in driver match routines so they don't need to
keep a local to prevent multiple matches?

Home | Main Index | Thread Index | Old Index