Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117519
b: refs/heads/master
c: 8cfc7ca
h: refs/heads/master
i:
  117517: 9084190
  117515: 1287882
  117511: 2a78f7d
  117503: 5c62248
v: v3
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent 23f8d84 commit e135418
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6a895307a6a8d8c294c57d319ec05286d181dac
refs/heads/master: 8cfc7ca40c41e6cb9ee96c149d5b928564d635e4
26 changes: 13 additions & 13 deletions trunk/drivers/block/paride/pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0);
#define ATAPI_READ_10 0x28
#define ATAPI_WRITE_10 0x2a

static int pf_open(struct inode *inode, struct file *file);
static int pf_open(struct block_device *bdev, fmode_t mode);
static void do_pf_request(struct request_queue * q);
static int pf_ioctl(struct inode *inode, struct file *file,
static int pf_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg);
static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo);

static int pf_release(struct inode *inode, struct file *file);
static int pf_release(struct gendisk *disk, fmode_t mode);

static int pf_detect(void);
static void do_pf_read(void);
Expand Down Expand Up @@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */

static struct block_device_operations pf_fops = {
.owner = THIS_MODULE,
.__open = pf_open,
.__release = pf_release,
.__ioctl = pf_ioctl,
.open = pf_open,
.release = pf_release,
.locked_ioctl = pf_ioctl,
.getgeo = pf_getgeo,
.media_changed = pf_check_media,
};
Expand Down Expand Up @@ -296,16 +296,16 @@ static void __init pf_init_units(void)
}
}

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

pf_identify(pf);

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

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

pf->access++;
Expand Down Expand Up @@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}

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

if (cmd != CDROMEJECT)
return -EINVAL;
Expand All @@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
return 0;
}

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

if (pf->access <= 0)
return -EINVAL;
Expand Down

0 comments on commit e135418

Please sign in to comment.