Commit f115a14a authored by Al Viro's avatar Al Viro

[PATCH] switch viodasd

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 4099a966
...@@ -130,15 +130,15 @@ struct viodasd_device { ...@@ -130,15 +130,15 @@ struct viodasd_device {
/* /*
* External open entry point. * External open entry point.
*/ */
static int viodasd_open(struct inode *ino, struct file *fil) static int viodasd_open(struct block_device *bdev, fmode_t mode)
{ {
struct viodasd_device *d = ino->i_bdev->bd_disk->private_data; struct viodasd_device *d = bdev->bd_disk->private_data;
HvLpEvent_Rc hvrc; HvLpEvent_Rc hvrc;
struct viodasd_waitevent we; struct viodasd_waitevent we;
u16 flags = 0; u16 flags = 0;
if (d->read_only) { if (d->read_only) {
if ((fil != NULL) && (fil->f_mode & FMODE_WRITE)) if (mode & FMODE_WRITE)
return -EROFS; return -EROFS;
flags = vioblockflags_ro; flags = vioblockflags_ro;
} }
...@@ -179,9 +179,9 @@ static int viodasd_open(struct inode *ino, struct file *fil) ...@@ -179,9 +179,9 @@ static int viodasd_open(struct inode *ino, struct file *fil)
/* /*
* External release entry point. * External release entry point.
*/ */
static int viodasd_release(struct inode *ino, struct file *fil) static int viodasd_release(struct gendisk *disk, fmode_t mode)
{ {
struct viodasd_device *d = ino->i_bdev->bd_disk->private_data; struct viodasd_device *d = disk->private_data;
HvLpEvent_Rc hvrc; HvLpEvent_Rc hvrc;
/* Send the event to OS/400. We DON'T expect a response */ /* Send the event to OS/400. We DON'T expect a response */
...@@ -221,8 +221,8 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) ...@@ -221,8 +221,8 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
*/ */
static struct block_device_operations viodasd_fops = { static struct block_device_operations viodasd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.__open = viodasd_open, .open = viodasd_open,
.__release = viodasd_release, .release = viodasd_release,
.getgeo = viodasd_getgeo, .getgeo = viodasd_getgeo,
}; };
......
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