aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2009-03-16 17:39:56 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2009-03-30 15:46:55 -0400
commit57ef80266e14ecc363380268fedc64e519047b4a (patch)
tree796619e61b70ce7ed2ac9571ca4961fe1903a3ab /drivers/pci/pci-driver.c
parent749b0afc3a9d90dda3319fd1464a3b32fc225361 (diff)
PCI PM: Consistently use variable name "error" for pm call return values
I noticed two functions use a variable "i" to store the return value of PM function calls while the rest of the file uses "error". As "i" normally indicates a counter of some sort it seems better to keep this consistent. Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 93eac1423585..a5f11ad975b2 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -352,17 +352,17 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
352{ 352{
353 struct pci_dev * pci_dev = to_pci_dev(dev); 353 struct pci_dev * pci_dev = to_pci_dev(dev);
354 struct pci_driver * drv = pci_dev->driver; 354 struct pci_driver * drv = pci_dev->driver;
355 int i = 0; 355 int error = 0;
356 356
357 if (drv && drv->suspend) { 357 if (drv && drv->suspend) {
358 pci_power_t prev = pci_dev->current_state; 358 pci_power_t prev = pci_dev->current_state;
359 359
360 pci_dev->state_saved = false; 360 pci_dev->state_saved = false;
361 361
362 i = drv->suspend(pci_dev, state); 362 error = drv->suspend(pci_dev, state);
363 suspend_report_result(drv->suspend, i); 363 suspend_report_result(drv->suspend, error);
364 if (i) 364 if (error)
365 return i; 365 return error;
366 366
367 if (pci_dev->state_saved) 367 if (pci_dev->state_saved)
368 goto Fixup; 368 goto Fixup;
@@ -385,20 +385,20 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
385 Fixup: 385 Fixup:
386 pci_fixup_device(pci_fixup_suspend, pci_dev); 386 pci_fixup_device(pci_fixup_suspend, pci_dev);
387 387
388 return i; 388 return error;
389} 389}
390 390
391static int pci_legacy_suspend_late(struct device *dev, pm_message_t state) 391static int pci_legacy_suspend_late(struct device *dev, pm_message_t state)
392{ 392{
393 struct pci_dev * pci_dev = to_pci_dev(dev); 393 struct pci_dev * pci_dev = to_pci_dev(dev);
394 struct pci_driver * drv = pci_dev->driver; 394 struct pci_driver * drv = pci_dev->driver;
395 int i = 0; 395 int error = 0;
396 396
397 if (drv && drv->suspend_late) { 397 if (drv && drv->suspend_late) {
398 i = drv->suspend_late(pci_dev, state); 398 error = drv->suspend_late(pci_dev, state);
399 suspend_report_result(drv->suspend_late, i); 399 suspend_report_result(drv->suspend_late, error);
400 } 400 }
401 return i; 401 return error;
402} 402}
403 403
404static int pci_legacy_resume_early(struct device *dev) 404static int pci_legacy_resume_early(struct device *dev)