ia64/linux-2.6.18-xen.hg

diff drivers/pci/pci-sysfs.c @ 816:f77ac4979fae

Backport: PCI: define PCI resource names in an 'enum'

commit fde09c6d8f92de0c9f75698a75f0989f2234c517
Author: Yu Zhao <yu.zhao@intel.com>
Date: Sat Nov 22 02:39:32 2008 +0800

PCI: define PCI resource names in an 'enum'

This patch moves all definitions of the PCI resource names to an
'enum',
and also replaces some hard-coded resource variables with symbol
names. This change eases introduction of device specific
resources.

Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 13 08:50:15 2009 +0000 (2009-03-13)
parents 3e8752eb6d9c
children
line diff
     1.1 --- a/drivers/pci/pci-sysfs.c	Fri Mar 13 07:42:13 2009 +0000
     1.2 +++ b/drivers/pci/pci-sysfs.c	Fri Mar 13 08:50:15 2009 +0000
     1.3 @@ -85,11 +85,13 @@ resource_show(struct device * dev, struc
     1.4  	struct pci_dev * pci_dev = to_pci_dev(dev);
     1.5  	char * str = buf;
     1.6  	int i;
     1.7 -	int max = 7;
     1.8 +	int max;
     1.9  	resource_size_t start, end;
    1.10  
    1.11  	if (pci_dev->subordinate)
    1.12  		max = DEVICE_COUNT_RESOURCE;
    1.13 +	else
    1.14 +		max = PCI_BRIDGE_RESOURCES;
    1.15  
    1.16  	for (i = 0; i < max; i++) {
    1.17  		struct resource *res =  &pci_dev->resource[i];