[lkml]   [2004]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: proper place for devfs_register_chrdev with pci_module_init
    On Wed, 4 Feb 2004, Greg KH wrote:

    > On Wed, Feb 04, 2004 at 05:29:31PM -0500, Richard B. Johnson wrote:
    > >
    > > I would call pci_find_class() and continue until a NULL is returned
    > > or my vendor and device are returned in the structure.
    > NOOOOO!!!!!
    > Do NOT do this. Use pci_register_driver() instead. Using pci_find_*()
    > is just broken and wrong for 99% of all pci drivers.
    > If you do this you do not hook up into sysfs properly. You do not get
    > modules automatically loaded for your driver. You do not get notified
    > if the device is removed from the system. And, most importantly, you do
    > not get exclusive access to the pci device.
    > As for the original poster, look at one of the many existing char
    > drivers for examples of what you need to do to register a char driver
    > properly. It really has nothing to do with the pci interface at all
    > (with the exception of when to register it...)
    > thanks,
    > greg k-h

    WTF? How do you find out if your board in actually in the system?
    You CANNOT load all possible modules, hoping that somebody will
    hot-plug in one of the devices a year from now.

    Dick Johnson
    Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
    Note 96.31% of all statistics are fiction.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:00    [W:0.019 / U:17.908 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site