]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PCI PM: Consistently use variable name "error" for pm call return values
authorFrans Pop <elendil@planet.nl>
Mon, 16 Mar 2009 21:39:56 +0000 (22:39 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 30 Mar 2009 19:46:55 +0000 (21:46 +0200)
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>
drivers/pci/pci-driver.c

index 93eac14235854c648e6e895c51f063b8af68e152..a5f11ad975b243d57bfc1fb0efc4baf978869f7c 100644 (file)
@@ -352,17 +352,17 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
 {
        struct pci_dev * pci_dev = to_pci_dev(dev);
        struct pci_driver * drv = pci_dev->driver;
-       int i = 0;
+       int error = 0;
 
        if (drv && drv->suspend) {
                pci_power_t prev = pci_dev->current_state;
 
                pci_dev->state_saved = false;
 
-               i = drv->suspend(pci_dev, state);
-               suspend_report_result(drv->suspend, i);
-               if (i)
-                       return i;
+               error = drv->suspend(pci_dev, state);
+               suspend_report_result(drv->suspend, error);
+               if (error)
+                       return error;
 
                if (pci_dev->state_saved)
                        goto Fixup;
@@ -385,20 +385,20 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
  Fixup:
        pci_fixup_device(pci_fixup_suspend, pci_dev);
 
-       return i;
+       return error;
 }
 
 static int pci_legacy_suspend_late(struct device *dev, pm_message_t state)
 {
        struct pci_dev * pci_dev = to_pci_dev(dev);
        struct pci_driver * drv = pci_dev->driver;
-       int i = 0;
+       int error = 0;
 
        if (drv && drv->suspend_late) {
-               i = drv->suspend_late(pci_dev, state);
-               suspend_report_result(drv->suspend_late, i);
+               error = drv->suspend_late(pci_dev, state);
+               suspend_report_result(drv->suspend_late, error);
        }
-       return i;
+       return error;
 }
 
 static int pci_legacy_resume_early(struct device *dev)