]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/message/i2o/pci.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / drivers / message / i2o / pci.c
index 1b58444d5aafa4d2bea4e96a18c9229357a5269d..8287f95c8c422d85d6107c162c158fe22165e117 100644 (file)
@@ -224,12 +224,11 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
  *     i2o_pci_interrupt - Interrupt handler for I2O controller
  *     @irq: interrupt line
  *     @dev_id: pointer to the I2O controller
- *     @r: pointer to registers
  *
  *     Handle an interrupt from a PCI based I2O controller. This turns out
  *     to be rather simple. We keep the controller pointer in the cookie.
  */
-static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r)
+static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id)
 {
        struct i2o_controller *c = dev_id;
        u32 m;
@@ -321,7 +320,6 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
        struct i2o_controller *c;
        int rc;
        struct pci_dev *i960 = NULL;
-       int enabled = pdev->is_enabled;
 
        printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n");
 
@@ -331,12 +329,11 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
                return -ENODEV;
        }
 
-       if (!enabled)
-               if ((rc = pci_enable_device(pdev))) {
-                       printk(KERN_WARNING "i2o: couldn't enable device %s\n",
-                              pci_name(pdev));
-                       return rc;
-               }
+       if ((rc = pci_enable_device(pdev))) {
+               printk(KERN_WARNING "i2o: couldn't enable device %s\n",
+                      pci_name(pdev));
+               return rc;
+       }
 
        if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
                printk(KERN_WARNING "i2o: no suitable DMA found for %s\n",
@@ -372,12 +369,13 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
                 * Expose the ship behind i960 for initialization, or it will
                 * failed
                 */
-               i960 =
-                   pci_find_slot(c->pdev->bus->number,
+               i960 = pci_get_slot(c->pdev->bus,
                                  PCI_DEVFN(PCI_SLOT(c->pdev->devfn), 0));
 
-               if (i960)
+               if (i960) {
                        pci_write_config_word(i960, 0x42, 0);
+                       pci_dev_put(i960);
+               }
 
                c->promise = 1;
                c->limit_sectors = 1;
@@ -442,8 +440,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
        i2o_iop_free(c);
 
       disable:
-       if (!enabled)
-               pci_disable_device(pdev);
+       pci_disable_device(pdev);
 
        return rc;
 }