Commit 4e379ae6 authored by Al Viro's avatar Al Viro

[PATCH] switch viocd

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 8389feb4
...@@ -151,25 +151,24 @@ static const struct file_operations proc_viocd_operations = { ...@@ -151,25 +151,24 @@ static const struct file_operations proc_viocd_operations = {
.release = single_release, .release = single_release,
}; };
static int viocd_blk_open(struct inode *inode, struct file *file) static int viocd_blk_open(struct block_device *bdev, fmode_t mode)
{ {
struct disk_info *di = inode->i_bdev->bd_disk->private_data; struct disk_info *di = bdev->bd_disk->private_data;
return cdrom_open(&di->viocd_info, inode->i_bdev, file->f_mode); return cdrom_open(&di->viocd_info, bdev, mode);
} }
static int viocd_blk_release(struct inode *inode, struct file *file) static int viocd_blk_release(struct gendisk *disk, fmode_t mode)
{ {
struct disk_info *di = inode->i_bdev->bd_disk->private_data; struct disk_info *di = disk->private_data;
cdrom_release(&di->viocd_info, file ? file->f_mode : 0); cdrom_release(&di->viocd_info, mode);
return 0; return 0;
} }
static int viocd_blk_ioctl(struct inode *inode, struct file *file, static int viocd_blk_ioctl(struct block_device *bdev, fmode_t mode,
unsigned cmd, unsigned long arg) unsigned cmd, unsigned long arg)
{ {
struct disk_info *di = inode->i_bdev->bd_disk->private_data; struct disk_info *di = bdev->bd_disk->private_data;
return cdrom_ioctl(&di->viocd_info, inode->i_bdev, return cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg);
file ? file->f_mode : 0, cmd, arg);
} }
static int viocd_blk_media_changed(struct gendisk *disk) static int viocd_blk_media_changed(struct gendisk *disk)
...@@ -180,9 +179,9 @@ static int viocd_blk_media_changed(struct gendisk *disk) ...@@ -180,9 +179,9 @@ static int viocd_blk_media_changed(struct gendisk *disk)
struct block_device_operations viocd_fops = { struct block_device_operations viocd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.__open = viocd_blk_open, .open = viocd_blk_open,
.__release = viocd_blk_release, .release = viocd_blk_release,
.__ioctl = viocd_blk_ioctl, .locked_ioctl = viocd_blk_ioctl,
.media_changed = viocd_blk_media_changed, .media_changed = viocd_blk_media_changed,
}; };
......
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