ide: delete filenames/versions from comments
[pandora-kernel.git] / drivers / ide / legacy / ht6560b.c
index 2e5a9cc..57bc15c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/drivers/ide/legacy/ht6560b.c         Version 0.07    Feb  1, 2000
- *
  *  Copyright (C) 1995-2000  Linus Torvalds & author (see below)
  */
 
@@ -247,6 +245,8 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio)
        }
 }
 
+static DEFINE_SPINLOCK(ht6560b_lock);
+
 /*
  *  Enable/Disable so called prefetch mode
  */
@@ -254,9 +254,9 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state)
 {
        unsigned long flags;
        int t = HT_PREFETCH_MODE << 8;
-       
-       spin_lock_irqsave(&ide_lock, flags);
-       
+
+       spin_lock_irqsave(&ht6560b_lock, flags);
+
        /*
         *  Prefetch mode and unmask irq seems to conflict
         */
@@ -268,9 +268,9 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state)
                drive->drive_data &= ~t;  /* disable prefetch mode */
                drive->no_unmask = 0;
        }
-       
-       spin_unlock_irqrestore(&ide_lock, flags);
-       
+
+       spin_unlock_irqrestore(&ht6560b_lock, flags);
+
 #ifdef DEBUG
        printk("ht6560b: drive %s prefetch mode %sabled\n", drive->name, (state ? "en" : "dis"));
 #endif
@@ -287,16 +287,14 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
                ht_set_prefetch(drive, pio & 1);
                return;
        }
-       
+
        timing = ht_pio2timings(drive, pio);
-       
-       spin_lock_irqsave(&ide_lock, flags);
-       
+
+       spin_lock_irqsave(&ht6560b_lock, flags);
        drive->drive_data &= 0xff00;
        drive->drive_data |= timing;
-       
-       spin_unlock_irqrestore(&ide_lock, flags);
-       
+       spin_unlock_irqrestore(&ht6560b_lock, flags);
+
 #ifdef DEBUG
        printk("ht6560b: drive %s tuned to pio mode %#x timing=%#x\n", drive->name, pio, timing);
 #endif
@@ -307,10 +305,10 @@ int probe_ht6560b = 0;
 module_param_named(probe, probe_ht6560b, bool, 0);
 MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
 
-/* Can be called directly from ide.c. */
-int __init ht6560b_init(void)
+static int __init ht6560b_init(void)
 {
        ide_hwif_t *hwif, *mate;
+       static u8 idx[4] = { 0, 1, 0xff, 0xff };
        int t;
 
        if (probe_ht6560b == 0)
@@ -359,11 +357,7 @@ int __init ht6560b_init(void)
        mate->drives[0].drive_data = t;
        mate->drives[1].drive_data = t;
 
-       probe_hwif_init(hwif);
-       probe_hwif_init(mate);
-
-       ide_proc_register_port(hwif);
-       ide_proc_register_port(mate);
+       ide_device_add(idx);
 
        return 0;
 
@@ -372,9 +366,7 @@ release_region:
        return -ENODEV;
 }
 
-#ifdef MODULE
 module_init(ht6560b_init);
-#endif
 
 MODULE_AUTHOR("See Local File");
 MODULE_DESCRIPTION("HT-6560B EIDE-controller support");