Commit 14add80b authored by Yu Zhao's avatar Yu Zhao Committed by Jesse Barnes

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: default avatarYu Zhao <yu.zhao@intel.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 6a49d812
...@@ -393,8 +393,8 @@ pci_restore_bars(struct pci_dev *dev) ...@@ -393,8 +393,8 @@ pci_restore_bars(struct pci_dev *dev)
return; return;
} }
for (i = 0; i < numres; i ++) for (i = 0; i < numres; i++)
pci_update_resource(dev, &dev->resource[i], i); pci_update_resource(dev, i);
} }
static struct pci_platform_pm_ops *pci_platform_pm; static struct pci_platform_pm_ops *pci_platform_pm;
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
#include "pci.h" #include "pci.h"
void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) void pci_update_resource(struct pci_dev *dev, int resno)
{ {
struct pci_bus_region region; struct pci_bus_region region;
u32 new, check, mask; u32 new, check, mask;
int reg; int reg;
struct resource *res = dev->resource + resno;
/* /*
* Ignore resources for unimplemented BARs and unused resource slots * Ignore resources for unimplemented BARs and unused resource slots
...@@ -162,7 +163,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) ...@@ -162,7 +163,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
} else { } else {
res->flags &= ~IORESOURCE_STARTALIGN; res->flags &= ~IORESOURCE_STARTALIGN;
if (resno < PCI_BRIDGE_RESOURCES) if (resno < PCI_BRIDGE_RESOURCES)
pci_update_resource(dev, res, resno); pci_update_resource(dev, resno);
} }
return ret; return ret;
...@@ -197,7 +198,7 @@ int pci_assign_resource_fixed(struct pci_dev *dev, int resno) ...@@ -197,7 +198,7 @@ int pci_assign_resource_fixed(struct pci_dev *dev, int resno)
dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n", dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n",
resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res); resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res);
} else if (resno < PCI_BRIDGE_RESOURCES) { } else if (resno < PCI_BRIDGE_RESOURCES) {
pci_update_resource(dev, res, resno); pci_update_resource(dev, resno);
} }
return ret; return ret;
......
...@@ -648,7 +648,7 @@ int pcie_get_readrq(struct pci_dev *dev); ...@@ -648,7 +648,7 @@ int pcie_get_readrq(struct pci_dev *dev);
int pcie_set_readrq(struct pci_dev *dev, int rq); int pcie_set_readrq(struct pci_dev *dev, int rq);
int pci_reset_function(struct pci_dev *dev); int pci_reset_function(struct pci_dev *dev);
int pci_execute_reset_function(struct pci_dev *dev); int pci_execute_reset_function(struct pci_dev *dev);
void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); void pci_update_resource(struct pci_dev *dev, int resno);
int __must_check pci_assign_resource(struct pci_dev *dev, int i); int __must_check pci_assign_resource(struct pci_dev *dev, int i);
int pci_select_bars(struct pci_dev *dev, unsigned long flags); int pci_select_bars(struct pci_dev *dev, unsigned long flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment