mfd: Storage class for timberdale should be before const qualifier
[safe/jmp/linux-2.6] / drivers / leds / leds-ss4200.c
index 0ec4ec3..a688293 100644 (file)
@@ -63,7 +63,7 @@ MODULE_LICENSE("GPL");
 /*
  * PCI ID of the Intel ICH7 LPC Device within which the GPIO block lives.
  */
-static struct pci_device_id ich7_lpc_pci_id[] =
+static const struct pci_device_id ich7_lpc_pci_id[] =
 {
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1) },
@@ -344,10 +344,14 @@ static struct pci_dev *nas_gpio_pci_dev;
 static int __devinit ich7_lpc_probe(struct pci_dev *dev,
                                    const struct pci_device_id *id)
 {
-       int status = 0;
+       int status;
        u32 gc = 0;
 
-       pci_enable_device(dev);
+       status = pci_enable_device(dev);
+       if (status) {
+               dev_err(&dev->dev, "pci_enable_device failed\n");
+               return -EIO;
+       }
 
        nas_gpio_pci_dev = dev;
        status = pci_read_config_dword(dev, PMBASE, &g_pm_io_base);
@@ -530,7 +534,7 @@ static int __init nas_gpio_init(void)
        set_power_light_amber_noblink();
        return 0;
 out_err:
-       for (; i >= 0; i--)
+       for (i--; i >= 0; i--)
                unregister_nasgpio_led(i);
        pci_unregister_driver(&nas_gpio_pci_driver);
        return ret;