Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117538
b: refs/heads/master
c: a5a1561
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent f58ca2c commit 84e5922
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3f6015bff7a15671bcadfac7215eb33a2bccc9d
refs/heads/master: a5a1561f88fe8bfd7fdceed1d942ad494500b8a9
17 changes: 8 additions & 9 deletions trunk/drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,17 @@ static void mmc_blk_put(struct mmc_blk_data *md)
mutex_unlock(&open_lock);
}

static int mmc_blk_open(struct inode *inode, struct file *filp)
static int mmc_blk_open(struct block_device *bdev, fmode_t mode)
{
struct mmc_blk_data *md;
struct mmc_blk_data *md = mmc_blk_get(bdev->bd_disk);
int ret = -ENXIO;

md = mmc_blk_get(inode->i_bdev->bd_disk);
if (md) {
if (md->usage == 2)
check_disk_change(inode->i_bdev);
check_disk_change(bdev);
ret = 0;

if ((filp->f_mode & FMODE_WRITE) && md->read_only) {
if ((mode & FMODE_WRITE) && md->read_only) {
mmc_blk_put(md);
ret = -EROFS;
}
Expand All @@ -112,9 +111,9 @@ static int mmc_blk_open(struct inode *inode, struct file *filp)
return ret;
}

static int mmc_blk_release(struct inode *inode, struct file *filp)
static int mmc_blk_release(struct gendisk *disk, fmode_t mode)
{
struct mmc_blk_data *md = inode->i_bdev->bd_disk->private_data;
struct mmc_blk_data *md = disk->private_data;

mmc_blk_put(md);
return 0;
Expand All @@ -130,8 +129,8 @@ mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
}

static struct block_device_operations mmc_bdops = {
.__open = mmc_blk_open,
.__release = mmc_blk_release,
.open = mmc_blk_open,
.release = mmc_blk_release,
.getgeo = mmc_blk_getgeo,
.owner = THIS_MODULE,
};
Expand Down

0 comments on commit 84e5922

Please sign in to comment.