aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:22:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:07 -0400
commitf115a14ae43242b485ed5995a0746e6db59951f2 (patch)
tree4a2accd06cfc87e576dfc8c5514a12ffece3a187 /drivers/block
parent4099a96693ab58a95b3ecf19704973cd0f1bdf9d (diff)
[PATCH] switch viodasd
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/viodasd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index 7f7beec29ebb..ecccf65dce2f 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -130,15 +130,15 @@ struct viodasd_device {
130/* 130/*
131 * External open entry point. 131 * External open entry point.
132 */ 132 */
133static int viodasd_open(struct inode *ino, struct file *fil) 133static int viodasd_open(struct block_device *bdev, fmode_t mode)
134{ 134{
135 struct viodasd_device *d = ino->i_bdev->bd_disk->private_data; 135 struct viodasd_device *d = bdev->bd_disk->private_data;
136 HvLpEvent_Rc hvrc; 136 HvLpEvent_Rc hvrc;
137 struct viodasd_waitevent we; 137 struct viodasd_waitevent we;
138 u16 flags = 0; 138 u16 flags = 0;
139 139
140 if (d->read_only) { 140 if (d->read_only) {
141 if ((fil != NULL) && (fil->f_mode & FMODE_WRITE)) 141 if (mode & FMODE_WRITE)
142 return -EROFS; 142 return -EROFS;
143 flags = vioblockflags_ro; 143 flags = vioblockflags_ro;
144 } 144 }
@@ -179,9 +179,9 @@ static int viodasd_open(struct inode *ino, struct file *fil)
179/* 179/*
180 * External release entry point. 180 * External release entry point.
181 */ 181 */
182static int viodasd_release(struct inode *ino, struct file *fil) 182static int viodasd_release(struct gendisk *disk, fmode_t mode)
183{ 183{
184 struct viodasd_device *d = ino->i_bdev->bd_disk->private_data; 184 struct viodasd_device *d = disk->private_data;
185 HvLpEvent_Rc hvrc; 185 HvLpEvent_Rc hvrc;
186 186
187 /* Send the event to OS/400. We DON'T expect a response */ 187 /* 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 */ 221 */
222static struct block_device_operations viodasd_fops = { 222static struct block_device_operations viodasd_fops = {
223 .owner = THIS_MODULE, 223 .owner = THIS_MODULE,
224 .__open = viodasd_open, 224 .open = viodasd_open,
225 .__release = viodasd_release, 225 .release = viodasd_release,
226 .getgeo = viodasd_getgeo, 226 .getgeo = viodasd_getgeo,
227}; 227};
228 228