X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-device.h;h=ffb69da3ce9ef85fc0271b89b9fc7a374c608580;hb=ba76a6e6a5eaa3736df743818394978af456cf70;hp=c9b1593923f6ef01a3cd069a8f1fdb1a74f178e4;hpb=fea0f9ff56258734ff1c49008c36ef6904b8c541;p=deliverable%2Flinux.git diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index c9b1593923f6..ffb69da3ce9e 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -120,6 +120,14 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); int __must_check v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); +/* Send a notification to v4l2_device. */ +static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, + unsigned int notification, void *arg) +{ + if (sd && sd->v4l2_dev && sd->v4l2_dev->notify) + sd->v4l2_dev->notify(sd, notification, arg); +} + /* Iterate over all subdevs. */ #define v4l2_device_for_each_subdev(sd, v4l2_dev) \ list_for_each_entry(sd, &(v4l2_dev)->subdevs, list)