diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-27 12:38:02 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-27 12:38:02 +0100 |
commit | 5292ae11babca23c3ff82593630d2d7eebc350a9 (patch) | |
tree | 30a6c8123b35686098f306ea39398b7621f42054 /drivers/mmc | |
parent | b0f209898f1a177bd503d49215b8c6628797a81c (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into x86/uv
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 24c97d3d16b..3d067c35185 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -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; } @@ -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; |