On Wed, Feb 11, 2009 at 11:23:45PM +0200, Ramagudi Naziir wrote:
> hello all,
> 
> I'm writing two platform_device structs for 2 devices I have on a
> board, which we need to support.
> one device is sdio controller (let's call it A), and the other one
> (let's call it B) is a device which is hard wired to that controller.
> everything works fine: the .probe function of each driver gets the
> right device struct.
> 
> but - i want that B will be dependent on A, so when the kernel goes to
> sleep, B's .suspend function will be called first, and only then A's.
> on the resume i want A's resume function to be called first. In
> addition, I need that B's probe function will always be called after
> A's probe function.
> 
> anyone knows how to make that dependency in the device model ?

Set the parent of B to be A.  The device model supports this kind of
relationship for this very reason.

hope this helps,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to