Re: device model - dependency question

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

 



On Sat, Feb 14, 2009 at 08:37:06AM +0200, Ramagudi Naziir wrote:
> Hi Greg
> 
> On Sat, Feb 14, 2009 at 4:08 AM, Greg KH <greg@xxxxxxxxx> wrote:
> >> 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.
> 
> What's the best way to do that ? Can I do that statically or during
> runtime ? If runtime, where's the recommended place to do that ?
> obviously it should be done before any .probe function get the chance
> to run...

You need to set the platform device's dev.parent of B field to point to
A before you register B and after you register A.

If you point me at your code, I'll show you how to do it.

thanks,

greg k-h

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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux