summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 16:31:38 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 13:48:33 +0200
commit5d9a54b66584bdae90e88198ce763702545a68e7 (patch)
tree3a9ea0698ee5f9fa6335f0b5b17b76d90d9e5ca2
parent[PATCH] switch md (diff)
downloadlinux-5d9a54b66584bdae90e88198ce763702545a68e7.tar.xz
linux-5d9a54b66584bdae90e88198ce763702545a68e7.zip
[PATCH] switch memstick
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--drivers/memstick/core/mspro_block.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index fbe5919789d0..7911151e56a3 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -172,9 +172,9 @@ static int mspro_block_complete_req(struct memstick_dev *card, int error);
/*** Block device ***/
-static int mspro_block_bd_open(struct inode *inode, struct file *filp)
+static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode)
{
- struct gendisk *disk = inode->i_bdev->bd_disk;
+ struct gendisk *disk = bdev->bd_disk;
struct mspro_block_data *msb = disk->private_data;
int rc = -ENXIO;
@@ -182,7 +182,7 @@ static int mspro_block_bd_open(struct inode *inode, struct file *filp)
if (msb && msb->card) {
msb->usage_count++;
- if ((filp->f_mode & FMODE_WRITE) && msb->read_only)
+ if ((mode & FMODE_WRITE) && msb->read_only)
rc = -EROFS;
else
rc = 0;
@@ -218,9 +218,8 @@ static int mspro_block_disk_release(struct gendisk *disk)
return 0;
}
-static int mspro_block_bd_release(struct inode *inode, struct file *filp)
+static int mspro_block_bd_release(struct gendisk *disk, fmode_t mode)
{
- struct gendisk *disk = inode->i_bdev->bd_disk;
return mspro_block_disk_release(disk);
}
@@ -237,8 +236,8 @@ static int mspro_block_bd_getgeo(struct block_device *bdev,
}
static struct block_device_operations ms_block_bdops = {
- .__open = mspro_block_bd_open,
- .__release = mspro_block_bd_release,
+ .open = mspro_block_bd_open,
+ .release = mspro_block_bd_release,
.getgeo = mspro_block_bd_getgeo,
.owner = THIS_MODULE
};