Re: pci_driver coding

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

 



This code defines structure with type pci_driver and name foo_driver with following
fields:
.name - the name of driver
.probe - function, which executes on device probe
.remove - function, which executes on device remove
.id_table - table of device identifiers. It must contain an array of PCI ID
structures (vendor ID, product ID, ...)

After definition of this structure, you can use it as:
      pci_register_driver(&foo_driver);
for registration your driver in PCI subsystem.

Ashok Sharma <aks6d@xxxxxxxxxxx> writes:

> Pl explain the following  structure declaration in PCI_driver code
>
> ?static struct pci_driver foo_driver {
> .name =  foo ,
> .probe = foo_pr obe,
> .remove = foo_remove,
> .id_table = foo_tbl,
> };
>
> consider me a novice only
>
> Cheers
> Ashok
>
>
> -------------------------------------------------------------------------------
> The all-new Yahoo! Mail goes wherever you go - free your email address from
> your Internet provider.

-- 
Maxim 'Zert' Treskin
	  Email: zerthurd(at)gmail.com
	  XMPP : zert(at)jabber.ru
Linux Developer
Eltex, Novosibirsk, Russia		eltex.nsk.ru


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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