]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-proc.c
ide: add ->max_sectors field to struct ide_port_info
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-proc.c
index c31d0dd7a5322aa56355462db58a213c3a3d9a63..c2e6b8927bdcf04c14877da9e7a947b996e4576f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 1997-1998    Mark Lord
- *  Copyright (C) 2003         Red Hat <alan@redhat.com>
+ *  Copyright (C) 2003         Red Hat
  *
  *  Some code was moved here from ide.c, see it for original copyrights.
  */
@@ -46,9 +46,7 @@ static int proc_ide_read_imodel
        case ide_qd65xx:        name = "qd65xx";        break;
        case ide_umc8672:       name = "umc8672";       break;
        case ide_ht6560b:       name = "ht6560b";       break;
-       case ide_rz1000:        name = "rz1000";        break;
        case ide_trm290:        name = "trm290";        break;
-       case ide_cmd646:        name = "cmd646";        break;
        case ide_cy82c693:      name = "cy82c693";      break;
        case ide_4drives:       name = "4drives";       break;
        case ide_pmac:          name = "mac-io";        break;
@@ -155,13 +153,8 @@ static int ide_read_setting(ide_drive_t *drive,
        const struct ide_devset *ds = setting->setting;
        int val = -EINVAL;
 
-       if (ds->get) {
-               unsigned long flags;
-
-               spin_lock_irqsave(&ide_lock, flags);
+       if (ds->get)
                val = ds->get(drive);
-               spin_unlock_irqrestore(&ide_lock, flags);
-       }
 
        return val;
 }
@@ -583,31 +576,19 @@ EXPORT_SYMBOL(ide_proc_register_driver);
  *     Clean up the driver specific /proc files and IDE settings
  *     for a given drive.
  *
- *     Takes ide_setting_mtx and ide_lock.
- *     Caller must hold none of the locks.
+ *     Takes ide_setting_mtx.
  */
 
 void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver)
 {
-       unsigned long flags;
-
        ide_remove_proc_entries(drive->proc, driver->proc_entries(drive));
 
        mutex_lock(&ide_setting_mtx);
-       spin_lock_irqsave(&ide_lock, flags);
        /*
-        * ide_setting_mtx protects the settings list
-        * ide_lock protects the use of settings
-        *
-        * so we need to hold both, ide_settings_sem because we want to
-        * modify the settings list, and ide_lock because we cannot take
-        * a setting out that is being used.
-        *
-        * OTOH both ide_{read,write}_setting are only ever used under
-        * ide_setting_mtx.
+        * ide_setting_mtx protects both the settings list and the use
+        * of settings (we cannot take a setting out that is being used).
         */
        drive->settings = NULL;
-       spin_unlock_irqrestore(&ide_lock, flags);
        mutex_unlock(&ide_setting_mtx);
 }
 EXPORT_SYMBOL(ide_proc_unregister_driver);