Skip to content

Commit

Permalink
ARM: versatile: fix build failure in pci.c
Browse files Browse the repository at this point in the history
commit 9f786d0

    "arm/PCI: get rid of device resource fixups"

causes this failure on the versatile:

arch/arm/mach-versatile/pci.c: In function 'pci_versatile_setup_resources':
arch/arm/mach-versatile/pci.c:221: error: 'sys' undeclared (first use in this function)

because the versatile wasn't passing in the full struct pci_sys_data
but only the resource sub-field.  Change it to pass in the full
struct so that sys will be in scope.

Reported-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Paul Gortmaker authored and Olof Johansson committed Apr 3, 2012
1 parent dd775ae commit ee5324e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/arm/mach-versatile/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static struct resource pre_mem = {
.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH,
};

static int __init pci_versatile_setup_resources(struct list_head *resources)
static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
{
int ret = 0;

Expand Down Expand Up @@ -218,9 +218,9 @@ static int __init pci_versatile_setup_resources(struct list_head *resources)
* the mem resource for this bus
* the prefetch mem resource for this bus
*/
pci_add_resource_offset(resources, &io_mem, sys->io_offset);
pci_add_resource_offset(resources, &non_mem, sys->mem_offset);
pci_add_resource_offset(resources, &pre_mem, sys->mem_offset);
pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset);
pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);

goto out;

Expand Down Expand Up @@ -249,7 +249,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)

if (nr == 0) {
sys->mem_offset = 0;
ret = pci_versatile_setup_resources(&sys->resources);
ret = pci_versatile_setup_resources(sys);
if (ret < 0) {
printk("pci_versatile_setup: resources... oops?\n");
goto out;
Expand Down

0 comments on commit ee5324e

Please sign in to comment.