aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:38 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:38 -0500
commit519d68082e56fe4a5a7d273465323a95cbe5a33f (patch)
tree8bd3497e08df46329070c404a544175452fe6538
parent94b9efdf5a3ec78bc31281ea3ba80028ce4ab057 (diff)
ide-cd: remove dead dsc_overlap setting
dsc_overlap setting is not useful anymore for ide-cd so remove "dsc_overlap" /proc setting, disallow changing the setting through HDIO_SET_NICE ioctl and cleanup ide_cd{rom_setup,_release}(). Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-cd.c15
-rw-r--r--drivers/ide/ide-ioctls.c2
2 files changed, 2 insertions, 15 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index ea35e94d0980..5daa4dd1b018 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1831,13 +1831,6 @@ static ide_proc_entry_t idecd_proc[] = {
1831 { NULL, 0, NULL, NULL } 1831 { NULL, 0, NULL, NULL }
1832}; 1832};
1833 1833
1834ide_devset_rw_flag(dsc_overlap, IDE_DFLAG_DSC_OVERLAP);
1835
1836static const struct ide_proc_devset idecd_settings[] = {
1837 IDE_PROC_DEVSET(dsc_overlap, 0, 1),
1838 { 0 },
1839};
1840
1841static ide_proc_entry_t *ide_cd_proc_entries(ide_drive_t *drive) 1834static ide_proc_entry_t *ide_cd_proc_entries(ide_drive_t *drive)
1842{ 1835{
1843 return idecd_proc; 1836 return idecd_proc;
@@ -1845,7 +1838,7 @@ static ide_proc_entry_t *ide_cd_proc_entries(ide_drive_t *drive)
1845 1838
1846static const struct ide_proc_devset *ide_cd_proc_devsets(ide_drive_t *drive) 1839static const struct ide_proc_devset *ide_cd_proc_devsets(ide_drive_t *drive)
1847{ 1840{
1848 return idecd_settings; 1841 return NULL;
1849} 1842}
1850#endif 1843#endif
1851 1844
@@ -1945,11 +1938,6 @@ static int ide_cdrom_setup(ide_drive_t *drive)
1945 /* set correct block size */ 1938 /* set correct block size */
1946 blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE); 1939 blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE);
1947 1940
1948 if (drive->next != drive)
1949 drive->dev_flags |= IDE_DFLAG_DSC_OVERLAP;
1950 else
1951 drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP;
1952
1953 if (ide_cdrom_register(drive, nslots)) { 1941 if (ide_cdrom_register(drive, nslots)) {
1954 printk(KERN_ERR PFX "%s: %s failed to register device with the" 1942 printk(KERN_ERR PFX "%s: %s failed to register device with the"
1955 " cdrom driver.\n", drive->name, __func__); 1943 " cdrom driver.\n", drive->name, __func__);
@@ -1986,7 +1974,6 @@ static void ide_cd_release(struct kref *kref)
1986 kfree(info->toc); 1974 kfree(info->toc);
1987 if (devinfo->handle == drive) 1975 if (devinfo->handle == drive)
1988 unregister_cdrom(devinfo); 1976 unregister_cdrom(devinfo);
1989 drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP;
1990 drive->driver_data = NULL; 1977 drive->driver_data = NULL;
1991 blk_queue_prep_rq(drive->queue, NULL); 1978 blk_queue_prep_rq(drive->queue, NULL);
1992 g->private_data = NULL; 1979 g->private_data = NULL;
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c
index f9034765aa18..28232c64c346 100644
--- a/drivers/ide/ide-ioctls.c
+++ b/drivers/ide/ide-ioctls.c
@@ -95,7 +95,7 @@ static int ide_set_nice_ioctl(ide_drive_t *drive, unsigned long arg)
95 return -EPERM; 95 return -EPERM;
96 96
97 if (((arg >> IDE_NICE_DSC_OVERLAP) & 1) && 97 if (((arg >> IDE_NICE_DSC_OVERLAP) & 1) &&
98 (drive->media == ide_disk || drive->media == ide_floppy || 98 (drive->media != ide_tape ||
99 (drive->dev_flags & IDE_DFLAG_SCSI))) 99 (drive->dev_flags & IDE_DFLAG_SCSI)))
100 return -EPERM; 100 return -EPERM;
101 101