Messages in this thread | | | Date | Mon, 25 Nov 2002 16:18:04 -0800 | From | Greg KH <> | Subject | Re: [PATCH] pcibios removal changes for 2.5.48 |
| |
On Wed, Nov 20, 2002 at 01:16:29PM +0300, Ivan Kokshaysky wrote: > On Tue, Nov 19, 2002 at 09:18:20PM -0800, Greg KH wrote: > > #ifdef CONFIG_CARDBUS > > if (s->state & SOCKET_CARDBUS) { > > u_int ptr; > > - pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); > > + struct pci_dev *dev = pci_find_slot (s->cap.cb_dev->subordinate->number, 0); > > + if (!dev) > > + return CS_BAD_HANDLE; > > + pci_read_config_dword(dev, 0x28, &ptr); > > tuple->CISOffset = ptr & ~7; > > SPACE(tuple->Flags) = (ptr & 7); > > } else > > pci_find_slot seems to be an overkill. Why not just > - pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); > + pci_bus_read_config_dword(s->cap.cb_dev->subordinate, 0, 0x28, &ptr);
Heh, didn't think of that one, I guess it would work too :)
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |