Re: Registering device

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

 



On Tue, Feb 03, 2004 at 09:13:56AM -0500, Prokopenko, Konstantyn wrote:
> Hi Karthik,
> 
> You can use register_chrdev() to register your device. To be able to talk to
> your PCI hardware you need to use
> provided PCI specific functions such as pci_find_device(),
> pci_read_config_XX, pci_write_config_XX, etc...
> pci_find_dev() returns pci_dev structure characterizing your PCI device.

Ick, NO!!!!

Do not use pci_find_dev() to get your pci device you want to bind to.
Use pci_register_driver() and friends instead to register a pci driver
with the pci core.  That way your driver will work properly with hotplug
systems, and with the 2.6 kernel.

Please read the pci.txt file in the Documentation directory for more
information, and move your drivers into this century...

Oh, and pci_find_dev() will be going away soon, you have been warned.

greg k-h

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