9
0
Fork 0

cdev: pass flags to open function

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-12-11 12:38:04 +01:00
parent afa7c80e74
commit 4ecd0003ac
5 changed files with 5 additions and 5 deletions

View File

@ -164,7 +164,7 @@ static int nand_bb_erase(struct cdev *cdev, size_t count, unsigned long offset)
}
#endif
static int nand_bb_open(struct cdev *cdev)
static int nand_bb_open(struct cdev *cdev, unsigned long flags)
{
struct nand_bb *bb = cdev->priv;

View File

@ -81,7 +81,7 @@ static ssize_t ubi_volume_cdev_write(struct cdev* cdev, const void *buf,
return err;
}
static int ubi_volume_cdev_open(struct cdev *cdev)
static int ubi_volume_cdev_open(struct cdev *cdev, unsigned long flags)
{
struct ubi_volume_cdev_priv *priv = cdev->priv;

View File

@ -63,7 +63,7 @@ struct cdev *cdev_open(const char *name, unsigned long flags)
return NULL;
if (cdev->ops->open) {
ret = cdev->ops->open(cdev);
ret = cdev->ops->open(cdev, flags);
if (ret)
return NULL;
}

View File

@ -116,7 +116,7 @@ static int devfs_open(struct device_d *_dev, FILE *f, const char *filename)
f->inode = cdev;
if (cdev->ops->open) {
ret = cdev->ops->open(cdev);
ret = cdev->ops->open(cdev, f->flags);
if (ret)
return ret;
}

View File

@ -366,7 +366,7 @@ struct file_operations {
int (*ioctl)(struct cdev*, int, void *);
off_t (*lseek)(struct cdev*, off_t);
int (*open)(struct cdev*);
int (*open)(struct cdev*, unsigned long flags);
int (*close)(struct cdev*);
int (*flush)(struct cdev*);
int (*erase)(struct cdev*, size_t count, unsigned long offset);