aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:24:18 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:15 -0400
commitf3f68b367389bcbe1823e6e775f4ec32d7d69b40 (patch)
tree87702355c8bb606bfa71dfd40f3bbba8a2b782a4 /drivers/block
parenta63c848b04052acac653d6164160488d6c52ff9e (diff)
[PATCH] switch xyspace
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xsysace.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index e4efe5b7ec22..ecab9e67d47a 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -870,25 +870,24 @@ static int ace_revalidate_disk(struct gendisk *gd)
870 return ace->id_result; 870 return ace->id_result;
871} 871}
872 872
873static int ace_open(struct inode *inode, struct file *filp) 873static int ace_open(struct block_device *bdev, fmode_t mode)
874{ 874{
875 struct ace_device *ace = inode->i_bdev->bd_disk->private_data; 875 struct ace_device *ace = bdev->bd_disk->private_data;
876 unsigned long flags; 876 unsigned long flags;
877 877
878 dev_dbg(ace->dev, "ace_open() users=%i\n", ace->users + 1); 878 dev_dbg(ace->dev, "ace_open() users=%i\n", ace->users + 1);
879 879
880 filp->private_data = ace;
881 spin_lock_irqsave(&ace->lock, flags); 880 spin_lock_irqsave(&ace->lock, flags);
882 ace->users++; 881 ace->users++;
883 spin_unlock_irqrestore(&ace->lock, flags); 882 spin_unlock_irqrestore(&ace->lock, flags);
884 883
885 check_disk_change(inode->i_bdev); 884 check_disk_change(bdev);
886 return 0; 885 return 0;
887} 886}
888 887
889static int ace_release(struct inode *inode, struct file *filp) 888static int ace_release(struct gendisk *disk, fmode_t mode)
890{ 889{
891 struct ace_device *ace = inode->i_bdev->bd_disk->private_data; 890 struct ace_device *ace = disk->private_data;
892 unsigned long flags; 891 unsigned long flags;
893 u16 val; 892 u16 val;
894 893
@@ -919,8 +918,8 @@ static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
919 918
920static struct block_device_operations ace_fops = { 919static struct block_device_operations ace_fops = {
921 .owner = THIS_MODULE, 920 .owner = THIS_MODULE,
922 .__open = ace_open, 921 .open = ace_open,
923 .__release = ace_release, 922 .release = ace_release,
924 .media_changed = ace_media_changed, 923 .media_changed = ace_media_changed,
925 .revalidate_disk = ace_revalidate_disk, 924 .revalidate_disk = ace_revalidate_disk,
926 .getgeo = ace_getgeo, 925 .getgeo = ace_getgeo,