diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index fb162cb3ebf5..7fff773f2df7 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -560,7 +560,6 @@ static sector_t idedisk_capacity (ide_drive_t *drive) | |||
560 | } | 560 | } |
561 | 561 | ||
562 | #ifdef CONFIG_IDE_PROC_FS | 562 | #ifdef CONFIG_IDE_PROC_FS |
563 | |||
564 | static int smart_enable(ide_drive_t *drive) | 563 | static int smart_enable(ide_drive_t *drive) |
565 | { | 564 | { |
566 | ide_task_t args; | 565 | ide_task_t args; |
@@ -678,11 +677,6 @@ static ide_proc_entry_t idedisk_proc[] = { | |||
678 | { "smart_thresholds", S_IFREG|S_IRUSR, proc_idedisk_read_smart_thresholds, NULL }, | 677 | { "smart_thresholds", S_IFREG|S_IRUSR, proc_idedisk_read_smart_thresholds, NULL }, |
679 | { NULL, 0, NULL, NULL } | 678 | { NULL, 0, NULL, NULL } |
680 | }; | 679 | }; |
681 | |||
682 | #else | ||
683 | |||
684 | #define idedisk_proc NULL | ||
685 | |||
686 | #endif /* CONFIG_IDE_PROC_FS */ | 680 | #endif /* CONFIG_IDE_PROC_FS */ |
687 | 681 | ||
688 | static void idedisk_prepare_flush(request_queue_t *q, struct request *rq) | 682 | static void idedisk_prepare_flush(request_queue_t *q, struct request *rq) |
@@ -881,6 +875,7 @@ static int set_lba_addressing(ide_drive_t *drive, int arg) | |||
881 | return 0; | 875 | return 0; |
882 | } | 876 | } |
883 | 877 | ||
878 | #ifdef CONFIG_IDE_PROC_FS | ||
884 | static void idedisk_add_settings(ide_drive_t *drive) | 879 | static void idedisk_add_settings(ide_drive_t *drive) |
885 | { | 880 | { |
886 | struct hd_driveid *id = drive->id; | 881 | struct hd_driveid *id = drive->id; |
@@ -898,6 +893,9 @@ static void idedisk_add_settings(ide_drive_t *drive) | |||
898 | ide_add_setting(drive, "failures", SETTING_RW, TYPE_INT, 0, 65535, 1, 1, &drive->failures, NULL); | 893 | ide_add_setting(drive, "failures", SETTING_RW, TYPE_INT, 0, 65535, 1, 1, &drive->failures, NULL); |
899 | ide_add_setting(drive, "max_failures", SETTING_RW, TYPE_INT, 0, 65535, 1, 1, &drive->max_failures, NULL); | 894 | ide_add_setting(drive, "max_failures", SETTING_RW, TYPE_INT, 0, 65535, 1, 1, &drive->max_failures, NULL); |
900 | } | 895 | } |
896 | #else | ||
897 | static inline void idedisk_add_settings(ide_drive_t *drive) { ; } | ||
898 | #endif | ||
901 | 899 | ||
902 | static void idedisk_setup (ide_drive_t *drive) | 900 | static void idedisk_setup (ide_drive_t *drive) |
903 | { | 901 | { |
@@ -1016,7 +1014,7 @@ static void ide_disk_remove(ide_drive_t *drive) | |||
1016 | struct ide_disk_obj *idkp = drive->driver_data; | 1014 | struct ide_disk_obj *idkp = drive->driver_data; |
1017 | struct gendisk *g = idkp->disk; | 1015 | struct gendisk *g = idkp->disk; |
1018 | 1016 | ||
1019 | ide_unregister_subdriver(drive, idkp->driver); | 1017 | ide_proc_unregister_driver(drive, idkp->driver); |
1020 | 1018 | ||
1021 | del_gendisk(g); | 1019 | del_gendisk(g); |
1022 | 1020 | ||
@@ -1081,7 +1079,9 @@ static ide_driver_t idedisk_driver = { | |||
1081 | .end_request = ide_end_request, | 1079 | .end_request = ide_end_request, |
1082 | .error = __ide_error, | 1080 | .error = __ide_error, |
1083 | .abort = __ide_abort, | 1081 | .abort = __ide_abort, |
1082 | #ifdef CONFIG_IDE_PROC_FS | ||
1084 | .proc = idedisk_proc, | 1083 | .proc = idedisk_proc, |
1084 | #endif | ||
1085 | }; | 1085 | }; |
1086 | 1086 | ||
1087 | static int idedisk_open(struct inode *inode, struct file *filp) | 1087 | static int idedisk_open(struct inode *inode, struct file *filp) |
@@ -1257,7 +1257,7 @@ static int ide_disk_probe(ide_drive_t *drive) | |||
1257 | 1257 | ||
1258 | ide_init_disk(g, drive); | 1258 | ide_init_disk(g, drive); |
1259 | 1259 | ||
1260 | ide_register_subdriver(drive, &idedisk_driver); | 1260 | ide_proc_register_driver(drive, &idedisk_driver); |
1261 | 1261 | ||
1262 | kref_init(&idkp->kref); | 1262 | kref_init(&idkp->kref); |
1263 | 1263 | ||