Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: move drivers/media/media-* to drivers/media/mc/mc-*

It is really weird that the media controller sources are all top-level
in drivers/media. It is a bit of a left-over from long ago when most
media sources were all at the top-level. At some point we reorganized
the directory structure, but the media-*.c sources where never moved
to their own directory.

So create a new mc directory and move all sources there. Also rename
the prefix from media- to mc-.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
c612e54f 03006bd0

+46 -44
+1 -33
drivers/media/Kconfig
··· 89 89 90 90 source "drivers/media/cec/Kconfig" 91 91 92 - # 93 - # Media controller 94 - # Selectable only for webcam/grabbers, as other drivers don't use it 95 - # 96 - 97 - config MEDIA_CONTROLLER 98 - bool "Media Controller API" 99 - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT 100 - help 101 - Enable the media controller API used to query media devices internal 102 - topology and configure it dynamically. 103 - 104 - This API is mostly used by camera interfaces in embedded platforms. 105 - 106 - config MEDIA_CONTROLLER_DVB 107 - bool "Enable Media controller for DVB (EXPERIMENTAL)" 108 - depends on MEDIA_CONTROLLER && DVB_CORE 109 - help 110 - Enable the media controller API support for DVB. 111 - 112 - This is currently experimental. 113 - 114 - config MEDIA_CONTROLLER_REQUEST_API 115 - bool "Enable Media controller Request API (EXPERIMENTAL)" 116 - depends on MEDIA_CONTROLLER && STAGING_MEDIA 117 - help 118 - DO NOT ENABLE THIS OPTION UNLESS YOU KNOW WHAT YOU'RE DOING. 119 - 120 - This option enables the Request API for the Media controller and V4L2 121 - interfaces. It is currently needed by a few stateless codec drivers. 122 - 123 - There is currently no intention to provide API or ABI stability for 124 - this new API as of yet. 92 + source "drivers/media/mc/Kconfig" 125 93 126 94 # 127 95 # Video4Linux support
+2 -11
drivers/media/Makefile
··· 3 3 # Makefile for the kernel multimedia device drivers. 4 4 # 5 5 6 - media-objs := media-device.o media-devnode.o media-entity.o \ 7 - media-request.o 8 - 9 - ifeq ($(CONFIG_MEDIA_CONTROLLER),y) 10 - ifeq ($(CONFIG_USB),y) 11 - media-objs += media-dev-allocator.o 12 - endif 13 - endif 14 - 15 6 # 16 7 # I2C drivers should come before other drivers, otherwise they'll fail 17 8 # when compiled as builtin drivers ··· 11 20 obj-$(CONFIG_DVB_CORE) += dvb-frontends/ 12 21 13 22 # 14 - # Now, let's link-in the media core 23 + # Now, let's link-in the media controller core 15 24 # 16 25 ifeq ($(CONFIG_MEDIA_CONTROLLER),y) 17 - obj-$(CONFIG_MEDIA_SUPPORT) += media.o 26 + obj-$(CONFIG_MEDIA_SUPPORT) += mc/ 18 27 endif 19 28 20 29 obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
+33
drivers/media/mc/Kconfig
··· 1 + # 2 + # Media controller 3 + # Selectable only for webcam/grabbers, as other drivers don't use it 4 + # 5 + 6 + config MEDIA_CONTROLLER 7 + bool "Media Controller API" 8 + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT 9 + help 10 + Enable the media controller API used to query media devices internal 11 + topology and configure it dynamically. 12 + 13 + This API is mostly used by camera interfaces in embedded platforms. 14 + 15 + config MEDIA_CONTROLLER_DVB 16 + bool "Enable Media controller for DVB (EXPERIMENTAL)" 17 + depends on MEDIA_CONTROLLER && DVB_CORE 18 + help 19 + Enable the media controller API support for DVB. 20 + 21 + This is currently experimental. 22 + 23 + config MEDIA_CONTROLLER_REQUEST_API 24 + bool "Enable Media controller Request API (EXPERIMENTAL)" 25 + depends on MEDIA_CONTROLLER && STAGING_MEDIA 26 + help 27 + DO NOT ENABLE THIS OPTION UNLESS YOU KNOW WHAT YOU'RE DOING. 28 + 29 + This option enables the Request API for the Media controller and V4L2 30 + interfaces. It is currently needed by a few stateless codec drivers. 31 + 32 + There is currently no intention to provide API or ABI stability for 33 + this new API as of yet.
+10
drivers/media/mc/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + mc-objs := mc-device.o mc-devnode.o mc-entity.o \ 4 + mc-request.o 5 + 6 + ifeq ($(CONFIG_USB),y) 7 + mc-objs += mc-dev-allocator.o 8 + endif 9 + 10 + obj-$(CONFIG_MEDIA_SUPPORT) += mc.o
drivers/media/media-dev-allocator.c drivers/media/mc/mc-dev-allocator.c
drivers/media/media-device.c drivers/media/mc/mc-device.c
drivers/media/media-devnode.c drivers/media/mc/mc-devnode.c
drivers/media/media-entity.c drivers/media/mc/mc-entity.c
drivers/media/media-request.c drivers/media/mc/mc-request.c