Re: Up to date driver-model docs?

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

 



2009/11/28 Philip Downer <phil@xxxxxxxxx>:
> Is there any up to date documentation of the driver-model? I've found that
> device.h is different to the docs in Documentation/driver-model/driver.txt
> and was going to post here when I found the following thread[1] from 2004.
> It's
> referring to different files to driver.txt but I'm assuming that everything
> is out of date as unfortunately nothing seems to have
> come from the old thread and I can't find any correct documentation.
>
> My immediate issue is that as per the docs, I wanted to use the supposed
> list structure in struct device_driver to get a list of all the devices
> attached to the driver, so if anyone can help me with that then I'd be
> grateful.

Refer to drivers/base/bus.c
http://lxr.linux.no/#linux+v2.6.31/drivers/base/bus.c#L166

You can get the bus which driver belongs then get devices belongs to
this bus iterately. (suppose the driver support devices in the same
bus)
And compare the driver which device bind. That's all. CMIIAW.

BRs, H. Johnny

--
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