ide: use ide_find_port() instead of ide_deprecated_find_port()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 17 Apr 2008 22:46:21 +0000 (00:46 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 17 Apr 2008 22:46:21 +0000 (00:46 +0200)
* Use ide_find_port() instead of ide_deprecated_find_port() in bast-ide/
  palm_bk3710/ide-cs/delkin_cb host drivers and in ide_register_hw().

* Remove no longer needed ide_deprecated_find_port().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/bast-ide.c
drivers/ide/arm/palm_bk3710.c
drivers/ide/ide.c
drivers/ide/legacy/ide-cs.c
drivers/ide/pci/delkin_cb.c
include/linux/ide.h

index 161d30c8481e8fe79bf135d97aa77c42d6be43f4..a22da7ab2b573786097e303245bd3bcd518d3dff 100644 (file)
@@ -41,7 +41,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
        hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
        hw.irq = irq;
 
-       hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+       hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
        if (hwif == NULL)
                goto out;
 
index 8e1f6bd338872c0fe08a985e81e75019c3f26983..0a722503c102a776a3110ec922b602637507a237 100644 (file)
@@ -378,7 +378,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
        hw.irq = irq->start;
        hw.chipset = ide_palm3710;
 
-       hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+       hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
        if (hwif == NULL)
                goto out;
 
index 67ce697a9d51f98036ecb8e907788ee37bd18898..bd5ff7d987d0967c89d50662de876bc8746b4d08 100644 (file)
@@ -618,31 +618,6 @@ void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw)
 }
 EXPORT_SYMBOL_GPL(ide_init_port_hw);
 
-ide_hwif_t *ide_deprecated_find_port(unsigned long base)
-{
-       ide_hwif_t *hwif;
-       int i;
-
-       for (i = 0; i < MAX_HWIFS; i++) {
-               hwif = &ide_hwifs[i];
-               if (hwif->io_ports[IDE_DATA_OFFSET] == base)
-                       goto found;
-       }
-
-       for (i = 0; i < MAX_HWIFS; i++) {
-               hwif = &ide_hwifs[i];
-               if (hwif->hold)
-                       continue;
-               if (!hwif->present && hwif->mate == NULL)
-                       goto found;
-       }
-
-       hwif = NULL;
-found:
-       return hwif;
-}
-EXPORT_SYMBOL_GPL(ide_deprecated_find_port);
-
 /**
  *     ide_register_hw         -       register IDE interface
  *     @hw: hardware registers
@@ -662,7 +637,7 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
        u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
        do {
-               hwif = ide_deprecated_find_port(hw->io_ports[IDE_DATA_OFFSET]);
+               hwif = ide_find_port(hw->io_ports[IDE_DATA_OFFSET]);
                if (hwif)
                        goto found;
                for (index = 0; index < MAX_HWIFS; index++)
index 15ccf6944ae21565a3829e2ecdfcaea3d7c6080e..de2e5944809e37fffbeca32429751c6fe5f71bdc 100644 (file)
@@ -156,7 +156,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq
     hw.chipset = ide_pci;
     hw.dev = &handle->dev;
 
-    hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+    hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
     if (hwif == NULL)
        return -1;
 
index 3f9cd64c26a6aa0f2214918c485fcce7c9b6d120..e08e13a0bb6e3173eaf1029f27ca305655a778ee 100644 (file)
@@ -78,7 +78,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
        hw.irq = dev->irq;
        hw.chipset = ide_pci;           /* this enables IRQ sharing */
 
-       hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+       hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
        if (hwif == NULL)
                goto out_disable;
 
index 43d2968a4e132be908f1259e399ef1122b173d3b..1b423958a89476a2307646acedc2072038d7fa58 100644 (file)
@@ -186,7 +186,6 @@ typedef struct hw_regs_s {
 } hw_regs_t;
 
 struct hwif_s * ide_find_port(unsigned long);
-struct hwif_s *ide_deprecated_find_port(unsigned long);
 void ide_init_port_data(struct hwif_s *, unsigned int);
 void ide_init_port_hw(struct hwif_s *, hw_regs_t *);