]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] vivid: Add an option to configure the maximum number of devices
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Mon, 28 Sep 2015 22:27:07 +0000 (19:27 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 3 Oct 2015 14:36:24 +0000 (11:36 -0300)
The vivid driver currently has a hard-coded limit of 64 devices,
however there's nothing that prevents the creation of even more devices.
This commit adds a new driver option (which defaults to 64) to
allow this maximum number to be configurable.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/Kconfig
drivers/media/platform/vivid/vivid-core.c

index c3090932f06d56cde74f3f2ed409325b3aff1d36..0885e93ad43665b61e668a1eb2909607993371b5 100644 (file)
@@ -20,3 +20,11 @@ config VIDEO_VIVID
 
          Say Y here if you want to test video apps or debug V4L devices.
          When in doubt, say N.
+
+config VIDEO_VIVID_MAX_DEVS
+       int "Maximum number of devices"
+       depends on VIDEO_VIVID
+       default "64"
+       ---help---
+         This allows you to specify the maximum number of devices supported
+         by the vivid driver.
index 0f5e9143cc7ea25930d31c1639daf5670a13d2df..ec125becb7af995a85b2810f55424c79a96bf7c3 100644 (file)
@@ -51,7 +51,7 @@
 #define VIVID_MODULE_NAME "vivid"
 
 /* The maximum number of vivid devices */
-#define VIVID_MAX_DEVS 64
+#define VIVID_MAX_DEVS CONFIG_VIDEO_VIVID_MAX_DEVS
 
 MODULE_DESCRIPTION("Virtual Video Test Driver");
 MODULE_AUTHOR("Hans Verkuil");