lkml.org 
[lkml]   [2000]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPCI device initialization.
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.048 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site