Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23031
b: refs/heads/master
c: 6a2900b
h: refs/heads/master
i:
  23029: 3e64604
  23027: 8cc4153
  23023: a946e18
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Mar 23, 2006
1 parent e143b5a commit 6605702
Show file tree
Hide file tree
Showing 11 changed files with 1,041 additions and 1,073 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2c5d4fc07a41a6048b01d3b2930aeff1235fda5
refs/heads/master: 6a2900b67652421b51fe25e4b86ecfec742b1f30
7 changes: 0 additions & 7 deletions trunk/drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ int register_cdrom(struct cdrom_device_info *cdi)
ENSURE(get_mcn, CDC_MCN);
ENSURE(reset, CDC_RESET);
ENSURE(audio_ioctl, CDC_PLAY_AUDIO);
ENSURE(dev_ioctl, CDC_IOCTLS);
ENSURE(generic_packet, CDC_GENERIC_PACKET);
cdi->mc_flags = 0;
cdo->n_minors = 0;
Expand Down Expand Up @@ -2776,12 +2775,6 @@ int cdrom_ioctl(struct file * file, struct cdrom_device_info *cdi,
return cdrom_ioctl_audioctl(cdi, cmd);
}

/*
* Finally, do the device specific ioctls
*/
if (CDROM_CAN(CDC_IOCTLS))
return cdi->ops->dev_ioctl(cdi, cmd, arg);

return -ENOSYS;
}

Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/cdrom/cdu31a.c
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,7 @@ static int scd_audio_ioctl(struct cdrom_device_info *cdi,
return retval;
}

static int scd_dev_ioctl(struct cdrom_device_info *cdi,
static int scd_read_audio(struct cdrom_device_info *cdi,
unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
Expand Down Expand Up @@ -2894,11 +2894,10 @@ static struct cdrom_device_ops scd_dops = {
.get_mcn = scd_get_mcn,
.reset = scd_reset,
.audio_ioctl = scd_audio_ioctl,
.dev_ioctl = scd_dev_ioctl,
.capability = CDC_OPEN_TRAY | CDC_CLOSE_TRAY | CDC_LOCK |
CDC_SELECT_SPEED | CDC_MULTI_SESSION |
CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO |
CDC_RESET | CDC_IOCTLS | CDC_DRIVE_STATUS,
CDC_RESET | CDC_DRIVE_STATUS,
.n_minors = 1,
};

Expand Down Expand Up @@ -2936,6 +2935,9 @@ static int scd_block_ioctl(struct inode *inode, struct file *file,
case CDROMCLOSETRAY:
retval = scd_tray_move(&scd_info, 0);
break;
case CDROMREADAUDIO:
retval = scd_read_audio(&scd_info, CDROMREADAUDIO, arg);
break;
default:
retval = cdrom_ioctl(file, &scd_info, inode, cmd, arg);
}
Expand Down
44 changes: 16 additions & 28 deletions trunk/drivers/cdrom/cm206.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,32 +1157,6 @@ static int cm206_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
}
}

/* Ioctl. These ioctls are specific to the cm206 driver. I have made
some driver statistics accessible through ioctl calls.
*/

static int cm206_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
unsigned long arg)
{
switch (cmd) {
#ifdef STATISTICS
case CM206CTL_GET_STAT:
if (arg >= NR_STATS)
return -EINVAL;
else
return cd->stats[arg];
case CM206CTL_GET_LAST_STAT:
if (arg >= NR_STATS)
return -EINVAL;
else
return cd->last_stat[arg];
#endif
default:
debug(("Unknown ioctl call 0x%x\n", cmd));
return -EINVAL;
}
}

static int cm206_media_changed(struct cdrom_device_info *cdi, int disc_nr)
{
if (cd != NULL) {
Expand Down Expand Up @@ -1321,11 +1295,10 @@ static struct cdrom_device_ops cm206_dops = {
.get_mcn = cm206_get_upc,
.reset = cm206_reset,
.audio_ioctl = cm206_audio_ioctl,
.dev_ioctl = cm206_ioctl,
.capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK |
CDC_MULTI_SESSION | CDC_MEDIA_CHANGED |
CDC_MCN | CDC_PLAY_AUDIO | CDC_SELECT_SPEED |
CDC_IOCTLS | CDC_DRIVE_STATUS,
CDC_DRIVE_STATUS,
.n_minors = 1,
};

Expand All @@ -1350,6 +1323,21 @@ static int cm206_block_release(struct inode *inode, struct file *file)
static int cm206_block_ioctl(struct inode *inode, struct file *file,
unsigned cmd, unsigned long arg)
{
switch (cmd) {
#ifdef STATISTICS
case CM206CTL_GET_STAT:
if (arg >= NR_STATS)
return -EINVAL;
return cd->stats[arg];
case CM206CTL_GET_LAST_STAT:
if (arg >= NR_STATS)
return -EINVAL;
return cd->last_stat[arg];
#endif
default:
break;
}

return cdrom_ioctl(file, &cm206_info, inode, cmd, arg);
}

Expand Down
Loading

0 comments on commit 6605702

Please sign in to comment.