summaryrefslogtreecommitdiff
path: root/include/media/v4l2-subdev.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-08 17:02:10 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:20 -0300
commit98ec633972a70cf71d71bc8762804f0af4792d08 (patch)
tree8f924a6d5804b56a24a58a1e60ea69d53996ece7 /include/media/v4l2-subdev.h
parent005759613b95264fba9138010f112bc138c857c2 (diff)
downloadlinux-3.10-98ec633972a70cf71d71bc8762804f0af4792d08.tar.gz
linux-3.10-98ec633972a70cf71d71bc8762804f0af4792d08.tar.bz2
linux-3.10-98ec633972a70cf71d71bc8762804f0af4792d08.zip
V4L/DVB (11021): v4l2-device: add a notify callback.
Add a notify callback to v4l2_device to let sub-devices notify their parent of special events. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r--include/media/v4l2-subdev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 05b69652e6c..1b97a2c33a7 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -191,4 +191,9 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
(!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ? \
(sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD))
+/* Send a notification to v4l2_device. */
+#define v4l2_subdev_notify(sd, notification, arg) \
+ ((!(sd) || !(sd)->v4l2_dev || !(sd)->v4l2_dev->notify) ? -ENODEV : \
+ (sd)->v4l2_dev->notify((sd), (notification), (arg)))
+
#endif