RE: Registering device

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

 



Hi Greg,

Thanks for the warning :)
Yes, we are using "old" 2.4 kernels for our developments and didn't migrate
to the newest kernels yet.
We are developing complicated medical machines with proprietary hardware.
For our purpose pci_find_device() is ABSOLUTELY legitimate as probably for
many "old timer" kernel module
developers :).

Anyway, thanks for the advise I'm looking forward to learn new kernels.

Regards,
Konstantyn


-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Tuesday, February 03, 2004 2:26 PM
To: Prokopenko, Konstantyn
Cc: 'S.Karthik'; kernelnewbies@nl.linux.org
Subject: Re: Registering device


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