]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-proc.c
IB: rename "dev" to "srp_dev" in srp_host structure
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-proc.c
index 00c249cba236c88e90d75411e64ce5841f1f2f6e..edd7f186dc4d220afdb362151f4ebc31a3543754 100644 (file)
@@ -46,9 +46,6 @@ static int proc_ide_read_imodel
        int             len;
        const char      *name;
 
-       /*
-        * Neither ide_unknown nor ide_forced should be set at this point.
-        */
        switch (hwif->chipset) {
                case ide_generic:       name = "generic";       break;
                case ide_pci:           name = "pci";           break;
@@ -65,6 +62,7 @@ static int proc_ide_read_imodel
                case ide_4drives:       name = "4drives";       break;
                case ide_pmac:          name = "mac-io";        break;
                case ide_au1xxx:        name = "au1xxx";        break;
+               case ide_palm3710:      name = "palm3710";      break;
                case ide_etrax100:      name = "etrax100";      break;
                case ide_acorn:         name = "acorn";         break;
                default:                name = "(unknown)";     break;
@@ -739,7 +737,7 @@ void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver)
 
 EXPORT_SYMBOL(ide_proc_unregister_driver);
 
-static void create_proc_ide_drives(ide_hwif_t *hwif)
+void ide_proc_port_register_devices(ide_hwif_t *hwif)
 {
        int     d;
        struct proc_dir_entry *ent;
@@ -763,27 +761,16 @@ static void create_proc_ide_drives(ide_hwif_t *hwif)
        }
 }
 
-static void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
+void ide_proc_unregister_device(ide_drive_t *drive)
 {
        if (drive->proc) {
                ide_remove_proc_entries(drive->proc, generic_drive_entries);
                remove_proc_entry(drive->name, proc_ide_root);
-               remove_proc_entry(drive->name, hwif->proc);
+               remove_proc_entry(drive->name, drive->hwif->proc);
                drive->proc = NULL;
        }
 }
 
-static void destroy_proc_ide_drives(ide_hwif_t *hwif)
-{
-       int     d;
-
-       for (d = 0; d < MAX_DRIVES; d++) {
-               ide_drive_t *drive = &hwif->drives[d];
-               if (drive->proc)
-                       destroy_proc_ide_device(hwif, drive);
-       }
-}
-
 static ide_proc_entry_t hwif_entries[] = {
        { "channel",    S_IFREG|S_IRUGO,        proc_ide_read_channel,  NULL },
        { "mate",       S_IFREG|S_IRUGO,        proc_ide_read_mate,     NULL },
@@ -793,9 +780,6 @@ static ide_proc_entry_t hwif_entries[] = {
 
 void ide_proc_register_port(ide_hwif_t *hwif)
 {
-       if (!hwif->present)
-               return;
-
        if (!hwif->proc) {
                hwif->proc = proc_mkdir(hwif->name, proc_ide_root);
 
@@ -804,8 +788,6 @@ void ide_proc_register_port(ide_hwif_t *hwif)
 
                ide_add_proc_entries(hwif->proc, hwif_entries, hwif);
        }
-
-       create_proc_ide_drives(hwif);
 }
 
 #ifdef CONFIG_BLK_DEV_IDEPCI
@@ -820,7 +802,6 @@ EXPORT_SYMBOL_GPL(ide_pci_create_host_proc);
 void ide_proc_unregister_port(ide_hwif_t *hwif)
 {
        if (hwif->proc) {
-               destroy_proc_ide_drives(hwif);
                ide_remove_proc_entries(hwif->proc, hwif_entries);
                remove_proc_entry(hwif->name, proc_ide_root);
                hwif->proc = NULL;