Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580545

[RFC 07/13] v4l2: device_register_subdev_nodes: allow calling multiple times

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject [RFC 07/13] v4l2: device_register_subdev_nodes: allow calling multiple times
Date 2017-02-14 14:50 +0100
Message-ID <taLEu-2wc-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

From: Sebastian Reichel <sre@kernel.org>

Without this, exposure / gain controls do not work in the camera application.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
 drivers/media/v4l2-core/v4l2-device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c
index f364cc1..b3afbe8 100644
--- a/drivers/media/v4l2-core/v4l2-device.c
+++ b/drivers/media/v4l2-core/v4l2-device.c
@@ -235,6 +235,9 @@ int v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev)
 		if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE))
 			continue;
 
+		if(sd->devnode)
+			continue;
+
 		vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
 		if (!vdev) {
 			err = -ENOMEM;
-- 
2.1.4


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[RFC 07/13] v4l2: device_register_subdev_nodes: allow calling  multiple times Pavel Machek <pavel@ucw.cz> - 2017-02-14 14:50 +0100
  Re: [RFC 07/13] v4l2: device_register_subdev_nodes: allow calling  multiple times Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-14 23:10 +0100
    Re: [RFC 07/13] v4l2: device_register_subdev_nodes: allow calling multiple times Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-02-14 23:10 +0100
      Re: [RFC 07/13] v4l2: device_register_subdev_nodes: allow calling  multiple times Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-14 23:20 +0100
    Re: [RFC 07/13] v4l2: device_register_subdev_nodes: allow calling  multiple times Pavel Machek <pavel@ucw.cz> - 2017-02-14 23:30 +0100

csiph-web