Skip to content

Commit 8cfc7ca

Browse files
author
Al Viro
committed
[PATCH] switch pf
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b6a8953 commit 8cfc7ca

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

  • drivers/block/paride

‎drivers/block/paride/pf.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0);
201201
#define ATAPI_READ_10 0x28
202202
#define ATAPI_WRITE_10 0x2a
203203

204-
static int pf_open(struct inode *inode, struct file *file);
204+
static int pf_open(struct block_device *bdev, fmode_t mode);
205205
static void do_pf_request(struct request_queue * q);
206-
static int pf_ioctl(struct inode *inode, struct file *file,
206+
static int pf_ioctl(struct block_device *bdev, fmode_t mode,
207207
unsigned int cmd, unsigned long arg);
208208
static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo);
209209

210-
static int pf_release(struct inode *inode, struct file *file);
210+
static int pf_release(struct gendisk *disk, fmode_t mode);
211211

212212
static int pf_detect(void);
213213
static void do_pf_read(void);
@@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */
264264

265265
static struct block_device_operations pf_fops = {
266266
.owner = THIS_MODULE,
267-
.__open = pf_open,
268-
.__release = pf_release,
269-
.__ioctl = pf_ioctl,
267+
.open = pf_open,
268+
.release = pf_release,
269+
.locked_ioctl = pf_ioctl,
270270
.getgeo = pf_getgeo,
271271
.media_changed = pf_check_media,
272272
};
@@ -296,16 +296,16 @@ static void __init pf_init_units(void)
296296
}
297297
}
298298

299-
static int pf_open(struct inode *inode, struct file *file)
299+
static int pf_open(struct block_device *bdev, fmode_t mode)
300300
{
301-
struct pf_unit *pf = inode->i_bdev->bd_disk->private_data;
301+
struct pf_unit *pf = bdev->bd_disk->private_data;
302302

303303
pf_identify(pf);
304304

305305
if (pf->media_status == PF_NM)
306306
return -ENODEV;
307307

308-
if ((pf->media_status == PF_RO) && (file->f_mode & FMODE_WRITE))
308+
if ((pf->media_status == PF_RO) && (mode & FMODE_WRITE))
309309
return -EROFS;
310310

311311
pf->access++;
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo)
333333
return 0;
334334
}
335335

336-
static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
336+
static int pf_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg)
337337
{
338-
struct pf_unit *pf = inode->i_bdev->bd_disk->private_data;
338+
struct pf_unit *pf = bdev->bd_disk->private_data;
339339

340340
if (cmd != CDROMEJECT)
341341
return -EINVAL;
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
346346
return 0;
347347
}
348348

349-
static int pf_release(struct inode *inode, struct file *file)
349+
static int pf_release(struct gendisk *disk, fmode_t mode)
350350
{
351-
struct pf_unit *pf = inode->i_bdev->bd_disk->private_data;
351+
struct pf_unit *pf = disk->private_data;
352352

353353
if (pf->access <= 0)
354354
return -EINVAL;

0 commit comments

Comments
 (0)