Re: how to define id table

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

 



On Tue, Nov 2, 2010 at 3:53 AM, Bond <jamesbond.2k.g@xxxxxxxxx> wrote:
>
> Hi,
> can any one tell me how is following type of structure defined?
>
> static DEFINE_PCI_DEVICE_TABLE(rtl8139_pci_tbl) = {
>        {0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x1113, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x1500, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>        {0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
>
> What do these 0x1186 and PCI_ANY_ID etc mean in above type of

0x1186 = vendor id
PCI_ANY_ID = subvendor and subdevice in this case is a wildcard these
values are hardly used
>
> structure also this type of definition of a structure where {},{} is
> used I am not clear with this approach.

It is an array of static pci_device_id structures each {} is one
element/struct of the array.
Normally, there is one struct in the array per device which this
driver is registered to bind to.

---
John

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