diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:29 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:29 -0400 |
commit | 02d599a365d04658bc9ea71762ed17c895079927 (patch) | |
tree | d6ea4634b2593ce1c71d66d869d1110c0ff3bbff /drivers | |
parent | ebc6be520673f65aef188abde43972f9cd2162e9 (diff) |
ide: remove ->supports_dsc_overlap field from ide_driver_t
* Use drive->media and drive->scsi to check if ->dsc_overlap
can be set by HDIO_SET_NICE ioctl in generic_ide_ioctl().
* Remove unused ->supports_dsc_overlap field from ide_driver_t.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-cd.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-disk.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide.c | 11 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 1 |
6 files changed, 5 insertions, 11 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 1f5652326489..7ea90de55058 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1969,7 +1969,6 @@ static ide_driver_t ide_cdrom_driver = { | |||
1969 | .remove = ide_cd_remove, | 1969 | .remove = ide_cd_remove, |
1970 | .version = IDECD_VERSION, | 1970 | .version = IDECD_VERSION, |
1971 | .media = ide_cdrom, | 1971 | .media = ide_cdrom, |
1972 | .supports_dsc_overlap = 1, | ||
1973 | .do_request = ide_cd_do_request, | 1972 | .do_request = ide_cd_do_request, |
1974 | .end_request = ide_end_request, | 1973 | .end_request = ide_end_request, |
1975 | .error = __ide_error, | 1974 | .error = __ide_error, |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 474070c1ddb6..08f47cb13425 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -980,7 +980,6 @@ static ide_driver_t idedisk_driver = { | |||
980 | .shutdown = ide_device_shutdown, | 980 | .shutdown = ide_device_shutdown, |
981 | .version = IDEDISK_VERSION, | 981 | .version = IDEDISK_VERSION, |
982 | .media = ide_disk, | 982 | .media = ide_disk, |
983 | .supports_dsc_overlap = 0, | ||
984 | .do_request = ide_do_rw_disk, | 983 | .do_request = ide_do_rw_disk, |
985 | .end_request = ide_end_request, | 984 | .end_request = ide_end_request, |
986 | .error = __ide_error, | 985 | .error = __ide_error, |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 673644fdb6f2..de8d42b3f698 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -1130,7 +1130,6 @@ static ide_driver_t idefloppy_driver = { | |||
1130 | .remove = ide_floppy_remove, | 1130 | .remove = ide_floppy_remove, |
1131 | .version = IDEFLOPPY_VERSION, | 1131 | .version = IDEFLOPPY_VERSION, |
1132 | .media = ide_floppy, | 1132 | .media = ide_floppy, |
1133 | .supports_dsc_overlap = 0, | ||
1134 | .do_request = idefloppy_do_request, | 1133 | .do_request = idefloppy_do_request, |
1135 | .end_request = idefloppy_end_request, | 1134 | .end_request = idefloppy_end_request, |
1136 | .error = __ide_error, | 1135 | .error = __ide_error, |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 7037accb0589..1fc1c2a6888f 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2607,7 +2607,6 @@ static ide_driver_t idetape_driver = { | |||
2607 | .remove = ide_tape_remove, | 2607 | .remove = ide_tape_remove, |
2608 | .version = IDETAPE_VERSION, | 2608 | .version = IDETAPE_VERSION, |
2609 | .media = ide_tape, | 2609 | .media = ide_tape, |
2610 | .supports_dsc_overlap = 1, | ||
2611 | .do_request = idetape_do_request, | 2610 | .do_request = idetape_do_request, |
2612 | .end_request = idetape_end_request, | 2611 | .end_request = idetape_end_request, |
2613 | .error = __ide_error, | 2612 | .error = __ide_error, |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 5b3bfc78dcdd..4d0c661e78a5 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -562,7 +562,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device | |||
562 | unsigned int cmd, unsigned long arg) | 562 | unsigned int cmd, unsigned long arg) |
563 | { | 563 | { |
564 | unsigned long flags; | 564 | unsigned long flags; |
565 | ide_driver_t *drv; | ||
566 | int err = 0, (*getfunc)(ide_drive_t *), (*setfunc)(ide_drive_t *, int); | 565 | int err = 0, (*getfunc)(ide_drive_t *), (*setfunc)(ide_drive_t *, int); |
567 | 566 | ||
568 | switch (cmd) { | 567 | switch (cmd) { |
@@ -612,12 +611,12 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device | |||
612 | if (!capable(CAP_SYS_ADMIN)) return -EACCES; | 611 | if (!capable(CAP_SYS_ADMIN)) return -EACCES; |
613 | if (arg != (arg & ((1 << IDE_NICE_DSC_OVERLAP) | (1 << IDE_NICE_1)))) | 612 | if (arg != (arg & ((1 << IDE_NICE_DSC_OVERLAP) | (1 << IDE_NICE_1)))) |
614 | return -EPERM; | 613 | return -EPERM; |
615 | drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1; | 614 | if (((arg >> IDE_NICE_DSC_OVERLAP) & 1) && |
616 | drv = *(ide_driver_t **)bdev->bd_disk->private_data; | 615 | (drive->media == ide_disk || |
617 | if (drive->dsc_overlap && !drv->supports_dsc_overlap) { | 616 | drive->media == ide_floppy || |
618 | drive->dsc_overlap = 0; | 617 | drive->scsi)) |
619 | return -EPERM; | 618 | return -EPERM; |
620 | } | 619 | drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1; |
621 | drive->nice1 = (arg >> IDE_NICE_1) & 1; | 620 | drive->nice1 = (arg >> IDE_NICE_1) & 1; |
622 | return 0; | 621 | return 0; |
623 | case HDIO_DRIVE_RESET: | 622 | case HDIO_DRIVE_RESET: |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 65cf84b222c5..a2d003c5e85f 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -522,7 +522,6 @@ static ide_driver_t idescsi_driver = { | |||
522 | .remove = ide_scsi_remove, | 522 | .remove = ide_scsi_remove, |
523 | .version = IDESCSI_VERSION, | 523 | .version = IDESCSI_VERSION, |
524 | .media = ide_scsi, | 524 | .media = ide_scsi, |
525 | .supports_dsc_overlap = 0, | ||
526 | .do_request = idescsi_do_request, | 525 | .do_request = idescsi_do_request, |
527 | .end_request = idescsi_end_request, | 526 | .end_request = idescsi_end_request, |
528 | .error = idescsi_atapi_error, | 527 | .error = idescsi_atapi_error, |