lkml.org 
[lkml]   [2002]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

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