Re: PATCH: was Re: 2.3.13 pci_namedevice compile error

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 12 Aug 1999 14:37:42 +0100 (BST)


> To be compartible with old struct pci_dev
> "base_address[i]" had to be substitute by
> "resource[i].start & resource[i].flags".
> This patch will not work ...
> You have to use
>
> static int __init
> pci_get_base_address(struct pci_dev *pdev, int index, u_long *base)
> )
> {
> *base = (pdev->resource[index].start|pdev->resource[index].flags);
> index++;
> return index;
> }

This patch will not work for some future machines. You are not
guaranteeed start has anything to do with the bits in flags.

See the updated patch I posted that keeps the two seperate (it gets both)

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