Re: [PATCH] pcibios removal changes for 2.5.48

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Wed Nov 20 2002 - 05:16:29 EST


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);

?

Ivan.
-
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/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:31 EST