diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-10 08:48:00 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-15 11:16:09 +0200 |
commit | 2672c906a4b83cd2aef1ddc0b9d2ec54b89eba3d (patch) | |
tree | 7fd4370608aac33a39bfa07069eb1d985381193c /include/driver.h | |
parent | bec70b3aaa1a750d32ac8c5299fb434454a87f07 (diff) | |
download | barebox-2672c906a4b83cd2aef1ddc0b9d2ec54b89eba3d.tar.gz barebox-2672c906a4b83cd2aef1ddc0b9d2ec54b89eba3d.tar.xz |
cdev: allow to open a struct cdev
cdev_open() opens a cdev by name. This introduces cdev_do_open which
allows to open a cdev when the cdev is already found by other means.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index 353af3a0cb..7ac2eef845 100644 --- a/include/driver.h +++ b/include/driver.h @@ -460,6 +460,7 @@ int devfs_remove(struct cdev *); int cdev_find_free_index(const char *); struct cdev *cdev_by_name(const char *filename); struct cdev *cdev_open(const char *name, unsigned long flags); +int cdev_do_open(struct cdev *, unsigned long flags); void cdev_close(struct cdev *cdev); int cdev_flush(struct cdev *cdev); ssize_t cdev_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags); |