aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/z2ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/z2ram.c')
-rw-r--r--drivers/block/z2ram.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index be20a67f1fa8..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
140static int 140static int z2_open(struct block_device *bdev, fmode_t mode)
141z2_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
301static int 300static int
302z2_release( struct inode *inode, struct file *filp ) 301z2_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;