From d4430d62fa77208824a37fe6f85ab2831d274769 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 2 Mar 2008 09:09:22 -0500 Subject: [PATCH] beginning of methods conversion To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by: Al Viro --- drivers/block/viodasd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/block/viodasd.c') diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 1730d29e604..7f7beec29eb 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c @@ -221,8 +221,8 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) */ static struct block_device_operations viodasd_fops = { .owner = THIS_MODULE, - .open = viodasd_open, - .release = viodasd_release, + .__open = viodasd_open, + .__release = viodasd_release, .getgeo = viodasd_getgeo, }; -- cgit v1.2.3-70-g09d2 From f115a14ae43242b485ed5995a0746e6db59951f2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 2 Mar 2008 10:22:07 -0500 Subject: [PATCH] switch viodasd Signed-off-by: Al Viro --- drivers/block/viodasd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/block/viodasd.c') diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 7f7beec29eb..ecccf65dce2 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c @@ -130,15 +130,15 @@ struct viodasd_device { /* * 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; struct viodasd_waitevent we; u16 flags = 0; if (d->read_only) { - if ((fil != NULL) && (fil->f_mode & FMODE_WRITE)) + if (mode & FMODE_WRITE) return -EROFS; flags = vioblockflags_ro; } @@ -179,9 +179,9 @@ static int viodasd_open(struct inode *ino, struct file *fil) /* * 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; /* 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) */ static struct block_device_operations viodasd_fops = { .owner = THIS_MODULE, - .__open = viodasd_open, - .__release = viodasd_release, + .open = viodasd_open, + .release = viodasd_release, .getgeo = viodasd_getgeo, }; -- cgit v1.2.3-70-g09d2