ia64/linux-2.6.18-xen.hg

changeset 815:f0dd7eb92bc9

Backport: PCI: remove unnecessary arg of pci_update_resource()

commit 14add80b5120966fe0659d61815b9e9b4b68fdc5
Author: Yu Zhao <yu.zhao@intel.com>
Date: Sat Nov 22 02:38:52 2008 +0800

PCI: remove unnecessary arg of pci_update_resource()

This cleanup removes unnecessary argument 'struct resource *res'
in
pci_update_resource(), so it takes same arguments as other
companion
functions (pci_assign_resource(), etc.).

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 07:42:13 2009 +0000 (2009-03-13)
parents e3cec0113535
children f77ac4979fae
files drivers/pci/pci.c drivers/pci/quirks.c drivers/pci/setup-res.c include/linux/pci.h
line diff
     1.1 --- a/drivers/pci/pci.c	Fri Mar 13 07:41:52 2009 +0000
     1.2 +++ b/drivers/pci/pci.c	Fri Mar 13 07:42:13 2009 +0000
     1.3 @@ -273,8 +273,8 @@ pci_restore_bars(struct pci_dev *dev)
     1.4  		return;
     1.5  	}
     1.6  
     1.7 -	for (i = 0; i < numres; i ++)
     1.8 -		pci_update_resource(dev, &dev->resource[i], i);
     1.9 +	for (i = 0; i < numres; i++)
    1.10 +		pci_update_resource(dev, &dev->resource[i]);
    1.11  }
    1.12  
    1.13  int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t);
     2.1 --- a/drivers/pci/quirks.c	Fri Mar 13 07:41:52 2009 +0000
     2.2 +++ b/drivers/pci/quirks.c	Fri Mar 13 07:42:13 2009 +0000
     2.3 @@ -56,7 +56,7 @@ static void __devinit quirk_release_reso
     2.4  			r->start = 0;
     2.5  
     2.6  			if (i < PCI_BRIDGE_RESOURCES) {
     2.7 -				pci_update_resource(dev, r, i);
     2.8 +				pci_update_resource(dev, i);
     2.9  			}
    2.10  		}
    2.11  		/* need to disable bridge's resource window,
     3.1 --- a/drivers/pci/setup-res.c	Fri Mar 13 07:41:52 2009 +0000
     3.2 +++ b/drivers/pci/setup-res.c	Fri Mar 13 07:42:13 2009 +0000
     3.3 @@ -27,11 +27,12 @@
     3.4  
     3.5  
     3.6  void
     3.7 -pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
     3.8 +pci_update_resource(struct pci_dev *dev, int resno)
     3.9  {
    3.10  	struct pci_bus_region region;
    3.11  	u32 new, check, mask;
    3.12  	int reg;
    3.13 +	struct resource *res = dev->resource + resno;
    3.14  
    3.15  	/* Ignore resources for unimplemented BARs and unused resource slots
    3.16  	   for 64 bit BARs. */
    3.17 @@ -183,7 +184,7 @@ int pci_assign_resource(struct pci_dev *
    3.18  				"%016llx - %016llx\n", resno, pci_name(dev),
    3.19  				 (unsigned long long)res->start,
    3.20  				 (unsigned long long)res->end);
    3.21 -		pci_update_resource(dev, res, resno);
    3.22 +		pci_update_resource(dev, resno);
    3.23  	}
    3.24  
    3.25  	return ret;
    3.26 @@ -221,7 +222,7 @@ int pci_assign_resource_fixed(struct pci
    3.27  			resno, (unsigned long long)(res->end - res->start + 1),
    3.28  			(unsigned long long)res->start, pci_name(dev));
    3.29  	} else if (resno < PCI_BRIDGE_RESOURCES) {
    3.30 -		pci_update_resource(dev, res, resno);
    3.31 +		pci_update_resource(dev, resno);
    3.32  	}
    3.33  
    3.34  	return ret;
     4.1 --- a/include/linux/pci.h	Fri Mar 13 07:41:52 2009 +0000
     4.2 +++ b/include/linux/pci.h	Fri Mar 13 07:42:13 2009 +0000
     4.3 @@ -500,7 +500,7 @@ void pci_clear_mwi(struct pci_dev *dev);
     4.4  void pci_intx(struct pci_dev *dev, int enable);
     4.5  int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
     4.6  int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
     4.7 -void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
     4.8 +void pci_update_resource(struct pci_dev *dev, int resno);
     4.9  int pci_assign_resource(struct pci_dev *dev, int i);
    4.10  int pci_assign_resource_fixed(struct pci_dev *dev, int i);
    4.11  void pci_restore_bars(struct pci_dev *dev);