PCI device initialization.

From: Rui Sousa (rsousa@grad.physics.sunysb.edu)
Date: Tue Mar 28 2000 - 13:58:30 EST


Hi,

Some questions about the new PCI device initialization:

Is check_region() obsolete?

If several devices are found the "probe" function will be called
several times, once per device?

In the case several devices are found are there any guarantees that
the "remove" function will be called in the reverse order of "probe"?

That is, if I keep the devices in a linked list is the following code
guaranteed to work? And does the list remain consistent (without "holes")?

device_probe(...) {
        struct my_device *device;

        device = kmalloc();

        device_list->next = device_list_head;
        device_list_head = device;

        pci_dev->driver_data = device;

}

device_remove (...) {
        struct my_device *device = pci_dev->driver_data;

        /* is this always true? device_list_head == device */

        device_list_head = device_list->next;

        kfree(device);
}

Or do I need to be more careful and search the list for the actual
device being removed and update it accordingly?

Thank you for your help,

Rui Sousa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:22 EST