Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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].

  2. #2
    Just 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.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    15
    Any help would be appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •