diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:24:45 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:17 -0400 |
commit | ab746cb9386313201f2e0060e85a30781047dee1 (patch) | |
tree | 526200d2d25a97fa5909018329a412ad0ab77bc7 /drivers/block | |
parent | f3f68b367389bcbe1823e6e775f4ec32d7d69b40 (diff) |
[PATCH] switch z2ram
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/z2ram.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 4860d0f36870..80754cdd3119 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c | |||
@@ -137,8 +137,7 @@ get_chipram( void ) | |||
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int | 140 | static int z2_open(struct block_device *bdev, fmode_t mode) |
141 | z2_open( struct inode *inode, struct file *filp ) | ||
142 | { | 141 | { |
143 | int device; | 142 | int device; |
144 | int max_z2_map = ( Z2RAM_SIZE / Z2RAM_CHUNKSIZE ) * | 143 | int max_z2_map = ( Z2RAM_SIZE / Z2RAM_CHUNKSIZE ) * |
@@ -147,7 +146,7 @@ z2_open( struct inode *inode, struct file *filp ) | |||
147 | sizeof( z2ram_map[0] ); | 146 | sizeof( z2ram_map[0] ); |
148 | int rc = -ENOMEM; | 147 | int rc = -ENOMEM; |
149 | 148 | ||
150 | device = iminor(inode); | 149 | device = MINOR(bdev->bd_dev); |
151 | 150 | ||
152 | if ( current_device != -1 && current_device != device ) | 151 | if ( current_device != -1 && current_device != device ) |
153 | { | 152 | { |
@@ -299,7 +298,7 @@ err_out: | |||
299 | } | 298 | } |
300 | 299 | ||
301 | static int | 300 | static int |
302 | z2_release( struct inode *inode, struct file *filp ) | 301 | z2_release(struct gendisk *disk, fmode_t mode) |
303 | { | 302 | { |
304 | if ( current_device == -1 ) | 303 | if ( current_device == -1 ) |
305 | return 0; | 304 | return 0; |
@@ -314,8 +313,8 @@ z2_release( struct inode *inode, struct file *filp ) | |||
314 | static struct block_device_operations z2_fops = | 313 | static struct block_device_operations z2_fops = |
315 | { | 314 | { |
316 | .owner = THIS_MODULE, | 315 | .owner = THIS_MODULE, |
317 | .__open = z2_open, | 316 | .open = z2_open, |
318 | .__release = z2_release, | 317 | .release = z2_release, |
319 | }; | 318 | }; |
320 | 319 | ||
321 | static struct kobject *z2_find(dev_t dev, int *part, void *data) | 320 | static struct kobject *z2_find(dev_t dev, int *part, void *data) |