ide: remove stale version number
[sfrench/cifs-2.6.git] / drivers / ide / ide.c
index 166acd513d5bd9249f78f9a8dfafc62494b0acd5..4a8952a6c3daa2433c8cc7c876c5d4b55388daf1 100644 (file)
@@ -44,8 +44,6 @@
  *  inspiration from lots of linux users, esp.  hamish@zot.apana.org.au
  */
 
-#define        REVISION        "Revision: 7.00alpha2"
-
 #define _IDE_C                 /* Tell ide.h it's really us */
 
 #include <linux/module.h>
@@ -618,60 +616,6 @@ abort:
 
 EXPORT_SYMBOL(ide_unregister);
 
-
-/**
- *     ide_setup_ports         -       set up IDE interface ports
- *     @hw: register descriptions
- *     @base: base register
- *     @offsets: table of register offsets
- *     @ctrl: control register
- *     @ack_irq: IRQ ack
- *     @irq: interrupt lie
- *
- *     Setup hw_regs_t structure described by parameters.  You
- *     may set up the hw structure yourself OR use this routine to
- *     do it for you. This is basically a helper
- *
- */
-void ide_setup_ports ( hw_regs_t *hw,
-                       unsigned long base, int *offsets,
-                       unsigned long ctrl, unsigned long intr,
-                       ide_ack_intr_t *ack_intr,
-/*
- *                     ide_io_ops_t *iops,
- */
-                       int irq)
-{
-       int i;
-
-       memset(hw, 0, sizeof(hw_regs_t));
-       for (i = 0; i < IDE_NR_PORTS; i++) {
-               if (offsets[i] == -1) {
-                       switch(i) {
-                               case IDE_CONTROL_OFFSET:
-                                       hw->io_ports[i] = ctrl;
-                                       break;
-#if defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
-                               case IDE_IRQ_OFFSET:
-                                       hw->io_ports[i] = intr;
-                                       break;
-#endif /* (CONFIG_AMIGA) || (CONFIG_MAC) */
-                               default:
-                                       hw->io_ports[i] = 0;
-                                       break;
-                       }
-               } else {
-                       hw->io_ports[i] = base + offsets[i];
-               }
-       }
-       hw->irq = irq;
-       hw->ack_intr = ack_intr;
-/*
- *     hw->iops = iops;
- */
-}
-
 void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw)
 {
        memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports));
@@ -683,6 +627,31 @@ 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
@@ -702,18 +671,10 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
        u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
        do {
-               for (index = 0; index < MAX_HWIFS; ++index) {
-                       hwif = &ide_hwifs[index];
-                       if (hwif->io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET])
-                               goto found;
-               }
-               for (index = 0; index < MAX_HWIFS; ++index) {
-                       hwif = &ide_hwifs[index];
-                       if (hwif->hold)
-                               continue;
-                       if (!hwif->present && hwif->mate == NULL)
-                               goto found;
-               }
+               hwif = ide_deprecated_find_port(hw->io_ports[IDE_DATA_OFFSET]);
+               index = hwif->index;
+               if (hwif)
+                       goto found;
                for (index = 0; index < MAX_HWIFS; index++)
                        ide_unregister(index, 1, 1);
        } while (retry--);
@@ -1018,11 +979,8 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
                case HDIO_GET_NICE:
                        return put_user(drive->dsc_overlap      <<      IDE_NICE_DSC_OVERLAP    |
                                        drive->atapi_overlap    <<      IDE_NICE_ATAPI_OVERLAP  |
-                                       drive->nice0            <<      IDE_NICE_0              |
-                                       drive->nice1            <<      IDE_NICE_1              |
-                                       drive->nice2            <<      IDE_NICE_2,
+                                       drive->nice1 << IDE_NICE_1,
                                        (long __user *) arg);
-
 #ifdef CONFIG_IDE_TASK_IOCTL
                case HDIO_DRIVE_TASKFILE:
                        if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
@@ -1658,7 +1616,7 @@ static int __init ide_init(void)
 {
        int ret;
 
-       printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n");
+       printk(KERN_INFO "Uniform Multi-Platform E-IDE driver\n");
        system_bus_speed = ide_system_bus_speed();
 
        printk(KERN_INFO "ide: Assuming %dMHz system bus speed "