summaryrefslogtreecommitdiffstats
path: root/drivers/media/Makefile
diff options
context:
space:
mode:
authorShuah Khan <shuah@kernel.org>2019-04-01 20:40:19 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-04-22 11:18:26 -0400
commit6e1d824e7a1d324f7fdd276fb7133013109d3764 (patch)
treedd135d8fd4f43d2375e1716eb0b6cb0dfc055ee7 /drivers/media/Makefile
parent33dfeb62e23c31619d2197850f7e8b50e8cc5466 (diff)
downloadlinux-6e1d824e7a1d324f7fdd276fb7133013109d3764.tar.bz2
media: Media Device Allocator API
Media Device Allocator API to allows multiple drivers share a media device. This API solves a very common use-case for media devices where one physical device (an USB stick) provides both audio and video. When such media device exposes a standard USB Audio class, a proprietary Video class, two or more independent drivers will share a single physical USB bridge. In such cases, it is necessary to coordinate access to the shared resource. Using this API, drivers can allocate a media device with the shared struct device as the key. Once the media device is allocated by a driver, other drivers can get a reference to it. The media device is released when all the references are released. Signed-off-by: Shuah Khan <shuah@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/Makefile')
-rw-r--r--drivers/media/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 985d35ec6b29..4a330d0e5e40 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -6,6 +6,12 @@
media-objs := media-device.o media-devnode.o media-entity.o \
media-request.o
+ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
+ ifeq ($(CONFIG_USB),y)
+ media-objs += media-dev-allocator.o
+ endif
+endif
+
#
# I2C drivers should come before other drivers, otherwise they'll fail
# when compiled as builtin drivers