]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: camera-gb: Extend gb camera module structure
authorEvgeniy Borisov <borisov_evgeniy@projectara.com>
Tue, 31 May 2016 08:33:10 +0000 (11:33 +0300)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 3 Jun 2016 15:57:48 +0000 (08:57 -0700)
Add additional information in gb camera module.
 - interface ID
 - reference count
 - release handle

Signed-off-by: Evgeniy Borisov <eborisov@mm-sol.com>
Reviewed-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/gb-camera.h

index 63f8c922fa9aa16d1feb0f053608d9cef33e5d23..b8651ed05244afdee9edbae1d9190f86d0895ca8 100644 (file)
@@ -105,12 +105,18 @@ struct gb_camera_ops {
  * struct gb_camera_module - Represents greybus camera module.
  * @priv: Module private data, passed to all camera operations.
  * @ops: Greybus camera operation callbacks.
+ * @interface_id: Interface id of the module.
+ * @refcount: Reference counting object.
+ * @release: Module release function.
  * @list: List entry in the camera modules list.
  */
 struct gb_camera_module {
        void *priv;
        const struct gb_camera_ops *ops;
 
+       unsigned int interface_id;
+       struct kref refcount;
+       void (*release)(struct kref *kref);
        struct list_head list; /* Global list */
 };