ide: make /proc/ide/ optional
[linux-drm-fsl-dcu.git] / drivers / ide / ide.c
index ae5bf2be6f52b158597aadd6b57245b746824f43..7a96f6f074941367cfc3c9e48100409c335a3eeb 100644 (file)
@@ -216,9 +216,6 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
        hwif->bus_state = BUSSTATE_ON;
 
        hwif->atapi_dma = 0;            /* disable all atapi dma */ 
-       hwif->ultra_mask = 0x80;        /* disable all ultra */
-       hwif->mwdma_mask = 0x80;        /* disable all mwdma */
-       hwif->swdma_mask = 0x80;        /* disable all swdma */
 
        init_completion(&hwif->gendev_rel_comp);
 
@@ -353,7 +350,7 @@ static int ide_system_bus_speed(void)
        return system_bus_speed;
 }
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_IDE_PROC_FS
 struct proc_dir_entry *proc_ide_root;
 #endif
 
@@ -480,6 +477,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
 
        hwif->tuneproc                  = tmp_hwif->tuneproc;
        hwif->speedproc                 = tmp_hwif->speedproc;
+       hwif->udma_filter               = tmp_hwif->udma_filter;
        hwif->selectproc                = tmp_hwif->selectproc;
        hwif->reset_poll                = tmp_hwif->reset_poll;
        hwif->pre_reset                 = tmp_hwif->pre_reset;
@@ -1894,7 +1892,7 @@ static void __init probe_for_hwifs (void)
 
 void ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver)
 {
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_IDE_PROC_FS
        ide_add_proc_entries(drive->proc, driver->proc, drive);
 #endif
 }
@@ -1916,8 +1914,8 @@ EXPORT_SYMBOL(ide_register_subdriver);
 void ide_unregister_subdriver(ide_drive_t *drive, ide_driver_t *driver)
 {
        unsigned long flags;
-       
-#ifdef CONFIG_PROC_FS
+
+#ifdef CONFIG_IDE_PROC_FS
        ide_remove_proc_entries(drive->proc, driver->proc);
 #endif
        down(&ide_setting_sem);
@@ -2071,7 +2069,7 @@ static int __init ide_init(void)
 
        init_ide_data();
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_IDE_PROC_FS
        proc_ide_root = proc_mkdir("ide", NULL);
 #endif
 
@@ -2101,9 +2099,8 @@ static int __init ide_init(void)
        probe_for_hwifs();
        initializing = 0;
 
-#ifdef CONFIG_PROC_FS
        proc_ide_create();
-#endif
+
        return 0;
 }
 
@@ -2143,9 +2140,7 @@ void __exit cleanup_module (void)
        pnpide_exit();
 #endif
 
-#ifdef CONFIG_PROC_FS
        proc_ide_destroy();
-#endif
 
        bus_unregister(&ide_bus_type);
 }