diff options
author | Yu Zhao <yu.zhao@intel.com> | 2008-11-21 13:38:52 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 14:13:00 -0500 |
commit | 14add80b5120966fe0659d61815b9e9b4b68fdc5 (patch) | |
tree | 7f803ec36d14e76fb0bc672717bd0dd3dea30a08 /drivers | |
parent | 6a49d8120021897e139641062236215aac5d220e (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci.c | 4 | ||||
-rw-r--r-- | drivers/pci/setup-res.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9354dd63f035..c3ef2e78fc58 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -393,8 +393,8 @@ pci_restore_bars(struct pci_dev *dev) | |||
393 | return; | 393 | return; |
394 | } | 394 | } |
395 | 395 | ||
396 | for (i = 0; i < numres; i ++) | 396 | for (i = 0; i < numres; i++) |
397 | pci_update_resource(dev, &dev->resource[i], i); | 397 | pci_update_resource(dev, i); |
398 | } | 398 | } |
399 | 399 | ||
400 | static struct pci_platform_pm_ops *pci_platform_pm; | 400 | static struct pci_platform_pm_ops *pci_platform_pm; |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 4e375632499a..3c5203ff53c7 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -26,11 +26,12 @@ | |||
26 | #include "pci.h" | 26 | #include "pci.h" |
27 | 27 | ||
28 | 28 | ||
29 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) | 29 | void pci_update_resource(struct pci_dev *dev, int resno) |
30 | { | 30 | { |
31 | struct pci_bus_region region; | 31 | struct pci_bus_region region; |
32 | u32 new, check, mask; | 32 | u32 new, check, mask; |
33 | int reg; | 33 | int reg; |
34 | struct resource *res = dev->resource + resno; | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Ignore resources for unimplemented BARs and unused resource slots | 37 | * Ignore resources for unimplemented BARs and unused resource slots |
@@ -162,7 +163,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
162 | } else { | 163 | } else { |
163 | res->flags &= ~IORESOURCE_STARTALIGN; | 164 | res->flags &= ~IORESOURCE_STARTALIGN; |
164 | if (resno < PCI_BRIDGE_RESOURCES) | 165 | if (resno < PCI_BRIDGE_RESOURCES) |
165 | pci_update_resource(dev, res, resno); | 166 | pci_update_resource(dev, resno); |
166 | } | 167 | } |
167 | 168 | ||
168 | return ret; | 169 | return ret; |
@@ -197,7 +198,7 @@ int pci_assign_resource_fixed(struct pci_dev *dev, int resno) | |||
197 | dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n", | 198 | dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n", |
198 | resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res); | 199 | resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res); |
199 | } else if (resno < PCI_BRIDGE_RESOURCES) { | 200 | } else if (resno < PCI_BRIDGE_RESOURCES) { |
200 | pci_update_resource(dev, res, resno); | 201 | pci_update_resource(dev, resno); |
201 | } | 202 | } |
202 | 203 | ||
203 | return ret; | 204 | return ret; |