diff options
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 4388b8ab69a1..8263f752809d 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -721,6 +721,7 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r | |||
721 | return ide_stopped; | 721 | return ide_stopped; |
722 | } | 722 | } |
723 | 723 | ||
724 | #ifdef CONFIG_IDE_PROC_FS | ||
724 | static void idescsi_add_settings(ide_drive_t *drive) | 725 | static void idescsi_add_settings(ide_drive_t *drive) |
725 | { | 726 | { |
726 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | 727 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); |
@@ -734,6 +735,9 @@ static void idescsi_add_settings(ide_drive_t *drive) | |||
734 | ide_add_setting(drive, "transform", SETTING_RW, TYPE_INT, 0, 3, 1, 1, &scsi->transform, NULL); | 735 | ide_add_setting(drive, "transform", SETTING_RW, TYPE_INT, 0, 3, 1, 1, &scsi->transform, NULL); |
735 | ide_add_setting(drive, "log", SETTING_RW, TYPE_INT, 0, 1, 1, 1, &scsi->log, NULL); | 736 | ide_add_setting(drive, "log", SETTING_RW, TYPE_INT, 0, 1, 1, 1, &scsi->log, NULL); |
736 | } | 737 | } |
738 | #else | ||
739 | static inline void idescsi_add_settings(ide_drive_t *drive) { ; } | ||
740 | #endif | ||
737 | 741 | ||
738 | /* | 742 | /* |
739 | * Driver initialization. | 743 | * Driver initialization. |
@@ -756,7 +760,7 @@ static void ide_scsi_remove(ide_drive_t *drive) | |||
756 | struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); | 760 | struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); |
757 | struct gendisk *g = scsi->disk; | 761 | struct gendisk *g = scsi->disk; |
758 | 762 | ||
759 | ide_unregister_subdriver(drive, scsi->driver); | 763 | ide_proc_unregister_driver(drive, scsi->driver); |
760 | 764 | ||
761 | ide_unregister_region(g); | 765 | ide_unregister_region(g); |
762 | 766 | ||
@@ -775,8 +779,6 @@ static ide_proc_entry_t idescsi_proc[] = { | |||
775 | { "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL }, | 779 | { "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL }, |
776 | { NULL, 0, NULL, NULL } | 780 | { NULL, 0, NULL, NULL } |
777 | }; | 781 | }; |
778 | #else | ||
779 | # define idescsi_proc NULL | ||
780 | #endif | 782 | #endif |
781 | 783 | ||
782 | static ide_driver_t idescsi_driver = { | 784 | static ide_driver_t idescsi_driver = { |
@@ -790,11 +792,13 @@ static ide_driver_t idescsi_driver = { | |||
790 | .version = IDESCSI_VERSION, | 792 | .version = IDESCSI_VERSION, |
791 | .media = ide_scsi, | 793 | .media = ide_scsi, |
792 | .supports_dsc_overlap = 0, | 794 | .supports_dsc_overlap = 0, |
793 | .proc = idescsi_proc, | ||
794 | .do_request = idescsi_do_request, | 795 | .do_request = idescsi_do_request, |
795 | .end_request = idescsi_end_request, | 796 | .end_request = idescsi_end_request, |
796 | .error = idescsi_atapi_error, | 797 | .error = idescsi_atapi_error, |
797 | .abort = idescsi_atapi_abort, | 798 | .abort = idescsi_atapi_abort, |
799 | #ifdef CONFIG_IDE_PROC_FS | ||
800 | .proc = idescsi_proc, | ||
801 | #endif | ||
798 | }; | 802 | }; |
799 | 803 | ||
800 | static int idescsi_ide_open(struct inode *inode, struct file *filp) | 804 | static int idescsi_ide_open(struct inode *inode, struct file *filp) |
@@ -1153,7 +1157,7 @@ static int ide_scsi_probe(ide_drive_t *drive) | |||
1153 | idescsi->host = host; | 1157 | idescsi->host = host; |
1154 | idescsi->disk = g; | 1158 | idescsi->disk = g; |
1155 | g->private_data = &idescsi->driver; | 1159 | g->private_data = &idescsi->driver; |
1156 | ide_register_subdriver(drive, &idescsi_driver); | 1160 | ide_proc_register_driver(drive, &idescsi_driver); |
1157 | err = 0; | 1161 | err = 0; |
1158 | idescsi_setup(drive, idescsi); | 1162 | idescsi_setup(drive, idescsi); |
1159 | g->fops = &idescsi_ops; | 1163 | g->fops = &idescsi_ops; |
@@ -1165,7 +1169,7 @@ static int ide_scsi_probe(ide_drive_t *drive) | |||
1165 | } | 1169 | } |
1166 | /* fall through on error */ | 1170 | /* fall through on error */ |
1167 | ide_unregister_region(g); | 1171 | ide_unregister_region(g); |
1168 | ide_unregister_subdriver(drive, &idescsi_driver); | 1172 | ide_proc_unregister_driver(drive, &idescsi_driver); |
1169 | 1173 | ||
1170 | put_disk(g); | 1174 | put_disk(g); |
1171 | out_host_put: | 1175 | out_host_put: |