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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
005759613b
commit
98ec633972
@@ -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
|
||||
|
Reference in New Issue
Block a user