aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:09 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:09 -0400
commitecfd80e4a514123070b4cfb674b817ba75055df2 (patch)
tree956baa39e22030d139803b7585bd71e91c637bb5 /drivers/ide/ide.c
parent29e744d088e3555f4efbdf390f01088dd66993b6 (diff)
ide: make /proc/ide/ optional
All important information/features should be already available through sysfs and ioctl interfaces. Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option, disabling it makes IDE driver ~5 kB smaller (on x86-32). While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}() and remove no longer needed #ifdefs. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 73f752142f9e..7a96f6f07494 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -350,7 +350,7 @@ static int ide_system_bus_speed(void)
350 return system_bus_speed; 350 return system_bus_speed;
351} 351}
352 352
353#ifdef CONFIG_PROC_FS 353#ifdef CONFIG_IDE_PROC_FS
354struct proc_dir_entry *proc_ide_root; 354struct proc_dir_entry *proc_ide_root;
355#endif 355#endif
356 356
@@ -1892,7 +1892,7 @@ static void __init probe_for_hwifs (void)
1892 1892
1893void ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver) 1893void ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver)
1894{ 1894{
1895#ifdef CONFIG_PROC_FS 1895#ifdef CONFIG_IDE_PROC_FS
1896 ide_add_proc_entries(drive->proc, driver->proc, drive); 1896 ide_add_proc_entries(drive->proc, driver->proc, drive);
1897#endif 1897#endif
1898} 1898}
@@ -1914,8 +1914,8 @@ EXPORT_SYMBOL(ide_register_subdriver);
1914void ide_unregister_subdriver(ide_drive_t *drive, ide_driver_t *driver) 1914void ide_unregister_subdriver(ide_drive_t *drive, ide_driver_t *driver)
1915{ 1915{
1916 unsigned long flags; 1916 unsigned long flags;
1917 1917
1918#ifdef CONFIG_PROC_FS 1918#ifdef CONFIG_IDE_PROC_FS
1919 ide_remove_proc_entries(drive->proc, driver->proc); 1919 ide_remove_proc_entries(drive->proc, driver->proc);
1920#endif 1920#endif
1921 down(&ide_setting_sem); 1921 down(&ide_setting_sem);
@@ -2069,7 +2069,7 @@ static int __init ide_init(void)
2069 2069
2070 init_ide_data(); 2070 init_ide_data();
2071 2071
2072#ifdef CONFIG_PROC_FS 2072#ifdef CONFIG_IDE_PROC_FS
2073 proc_ide_root = proc_mkdir("ide", NULL); 2073 proc_ide_root = proc_mkdir("ide", NULL);
2074#endif 2074#endif
2075 2075
@@ -2099,9 +2099,8 @@ static int __init ide_init(void)
2099 probe_for_hwifs(); 2099 probe_for_hwifs();
2100 initializing = 0; 2100 initializing = 0;
2101 2101
2102#ifdef CONFIG_PROC_FS
2103 proc_ide_create(); 2102 proc_ide_create();
2104#endif 2103
2105 return 0; 2104 return 0;
2106} 2105}
2107 2106
@@ -2141,9 +2140,7 @@ void __exit cleanup_module (void)
2141 pnpide_exit(); 2140 pnpide_exit();
2142#endif 2141#endif
2143 2142
2144#ifdef CONFIG_PROC_FS
2145 proc_ide_destroy(); 2143 proc_ide_destroy();
2146#endif
2147 2144
2148 bus_unregister(&ide_bus_type); 2145 bus_unregister(&ide_bus_type);
2149} 2146}