Skip to content

Commit

Permalink
[PATCH] switch xyspace
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent a63c848 commit f3f68b3
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions drivers/block/xsysace.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,25 +870,24 @@ static int ace_revalidate_disk(struct gendisk *gd)
return ace->id_result;
}

static int ace_open(struct inode *inode, struct file *filp)
static int ace_open(struct block_device *bdev, fmode_t mode)
{
struct ace_device *ace = inode->i_bdev->bd_disk->private_data;
struct ace_device *ace = bdev->bd_disk->private_data;
unsigned long flags;

dev_dbg(ace->dev, "ace_open() users=%i\n", ace->users + 1);

filp->private_data = ace;
spin_lock_irqsave(&ace->lock, flags);
ace->users++;
spin_unlock_irqrestore(&ace->lock, flags);

check_disk_change(inode->i_bdev);
check_disk_change(bdev);
return 0;
}

static int ace_release(struct inode *inode, struct file *filp)
static int ace_release(struct gendisk *disk, fmode_t mode)
{
struct ace_device *ace = inode->i_bdev->bd_disk->private_data;
struct ace_device *ace = disk->private_data;
unsigned long flags;
u16 val;

Expand Down Expand Up @@ -919,8 +918,8 @@ static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)

static struct block_device_operations ace_fops = {
.owner = THIS_MODULE,
.__open = ace_open,
.__release = ace_release,
.open = ace_open,
.release = ace_release,
.media_changed = ace_media_changed,
.revalidate_disk = ace_revalidate_disk,
.getgeo = ace_getgeo,
Expand Down

0 comments on commit f3f68b3

Please sign in to comment.