Commit b3954b06 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (1/3) more kdev_t removals

	1.	moves a bunch of generic ioctls from sr_dev_ioctl() to
		cdrom_ioctl().
	2.	switches blk_ioctl() to struct block_device *
	3.	ditto for blkpg_ioctl()
parent 0e7e6fda
...@@ -263,6 +263,7 @@ ...@@ -263,6 +263,7 @@
#include <linux/cdrom.h> #include <linux/cdrom.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/blkpg.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/fcntl.h> #include <asm/fcntl.h>
...@@ -1724,6 +1725,11 @@ int cdrom_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, ...@@ -1724,6 +1725,11 @@ int cdrom_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
because they fill up the sys log when CD players poll because they fill up the sys log when CD players poll
the drive. */ the drive. */
switch (cmd) { switch (cmd) {
case BLKROSET:
case BLKROGET:
case BLKFLSBUF:
case BLKSSZGET:
return blk_ioctl(ip->i_rdev, cmd, arg);
case CDROMSUBCHNL: { case CDROMSUBCHNL: {
struct cdrom_subchnl q; struct cdrom_subchnl q;
u_char requested, back; u_char requested, back;
......
...@@ -548,11 +548,6 @@ int sr_dev_ioctl(struct cdrom_device_info *cdi, ...@@ -548,11 +548,6 @@ int sr_dev_ioctl(struct cdrom_device_info *cdi,
return put_user(scsi_CDs[target].capacity, (unsigned long *) arg); return put_user(scsi_CDs[target].capacity, (unsigned long *) arg);
case BLKGETSIZE64: case BLKGETSIZE64:
return put_user((u64)scsi_CDs[target].capacity << 9, (u64 *)arg); return put_user((u64)scsi_CDs[target].capacity << 9, (u64 *)arg);
case BLKROSET:
case BLKROGET:
case BLKFLSBUF:
case BLKSSZGET:
return blk_ioctl(cdi->dev, cmd, arg);
default: default:
return scsi_ioctl(scsi_CDs[target].device, cmd, (void *) arg); return scsi_ioctl(scsi_CDs[target].device, cmd, (void *) arg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment