summaryrefslogtreecommitdiff
path: root/linux/include/media/v4l2-device.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include/media/v4l2-device.h')
-rw-r--r--linux/include/media/v4l2-device.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux/include/media/v4l2-device.h b/linux/include/media/v4l2-device.h
index 5d7146dc2..0dd3e8e86 100644
--- a/linux/include/media/v4l2-device.h
+++ b/linux/include/media/v4l2-device.h
@@ -44,13 +44,20 @@ struct v4l2_device {
spinlock_t lock;
/* unique device name, by default the driver name + bus ID */
char name[V4L2_DEVICE_NAME_SIZE];
+ /* notify callback called by some sub-devices. */
+ void (*notify)(struct v4l2_subdev *sd,
+ unsigned int notification, void *arg);
};
/* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev.
dev may be NULL in rare cases (ISA devices). In that case you
must fill in the v4l2_dev->name field before calling this function. */
int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
-/* Set v4l2_dev->dev->driver_data to NULL and unregister all sub-devices */
+/* Set v4l2_dev->dev to NULL. Call when the USB parent disconnects.
+ Since the parent disappears this ensures that v4l2_dev doesn't have an
+ invalid parent pointer. */
+void v4l2_device_disconnect(struct v4l2_device *v4l2_dev);
+/* Unregister all sub-devices and any other resources related to v4l2_dev. */
void v4l2_device_unregister(struct v4l2_device *v4l2_dev);
/* Register a subdev with a v4l2 device. While registered the subdev module