Thread (1 message) 1 message, 1 author, 2010-01-13

Re: Can we remove pci_find_device() yet?

From: Krzysztof Halasa <khc@pm.waw.pl>
Date: 2010-01-13 15:09:19
Also in: lkml

Greg KH [off-list ref] writes:
quoted
One of our older controllers had a similar design error in that the two
functions would sometimes have to be reset together.  The way we look
for the second function is:

	dev = pci_dev_get(dev1);
	while ((dev = pci_get_device(vendor_id, device_id, dev))) {
		if (dev->bus == dev1->bus &&
		    dev->devfn == dev1->devfn + 1) {
			dev2 = dev;
			break;
		}
	}

I assume this is 'properly' since no-one has told me otherwise.
As of right now, yes, this is the "correct" way to do this.

I need to dig up the "let multiple drivers bind to a single device"
patch set to make this not necessary in the future.
Ben and Greg, thanks.
-- 
Krzysztof Halasa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help