Results 1 to 3 of 3
I have been implementing USB driver in kernel 2.4.7.
I called pci_register_driver() function inside module_init.
The mentioned function always returns ZERO. After viewing its definition from linux/pci.h , I came ...
- 09-19-2011 #1Just Joined!
- Join Date
- Apr 2009
- Location
- Chennai
- Posts
- 15
Regarding pci_register_driver() function
I have been implementing USB driver in kernel 2.4.7.
I called pci_register_driver() function inside module_init.
The mentioned function always returns ZERO. After viewing its definition from linux/pci.h , I came to know that the funtion definition is
static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
Then my question is, how can my driver is registered with the structure[struct pci_driver].
- 09-20-2011 #2Just Joined!
- Join Date
- Apr 2009
- Location
- Chennai
- Posts
- 15
For your information, the definition for pci_register_driver() function is also given in drivers/pci/pci.c
I dont know whether I can use that... From that code, I came to know that the function returns the total number of PCI devices found in the system.. But for my understanding from the book, this function should return zero if it is passed.
So, Kindly help regarding it.
- 09-26-2011 #3Just Joined!
- Join Date
- Apr 2009
- Location
- Chennai
- Posts
- 15
Any help would be appreciated.


Reply With Quote
