On Fri, 2021-03-12 at 14:56 +0200, Sakari Ailus wrote: > The V4L2 async framework is generally used with the V4L2 fwnode, which > also depends on the former. There is only one exception, the CAFE_CCIC > driver, which uses V4L2 async but does not need V4L2 fwnode. > > At the same time there is a vast number of systems that need videodev > module, but have no use for v4l2-async that's now part of videodev. > > In order to improve, build v4l2-async and v4l2-fwnode as a single module > called v4l2-async (the v4l2-async.c file is renamed as v4l2-async-core.c). > Also the menu item V4L2_FWNODE is renamed as V4L2_ASYNC. > Seems this is not what this patch is doing: the symbol is not renamed, and now we have two modules v4l2-fwnode.ko and v4l2-async.ko, unless I'm confused. I personally was more fond of having just one v4l2-async.ko module, but I'm not sure if you found any obstacles. > This also moves the initialisation of the debufs entries for async subdevs > to loading of the v4l2-async module. The directory is named as > "v4l2-async". > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > drivers/media/i2c/Kconfig | 8 ++++++++ > drivers/media/v4l2-core/Kconfig | 4 ++++ > drivers/media/v4l2-core/Makefile | 11 +++++++++-- > drivers/media/v4l2-core/v4l2-async.c | 23 +++++++++++++++++++++-- > drivers/media/v4l2-core/v4l2-dev.c | 5 ----- > 5 files changed, 42 insertions(+), 9 deletions(-) > [..] > diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile > index e4cd589b99a5..eb5ebb5461fd 100644 > --- a/drivers/media/v4l2-core/Makefile > +++ b/drivers/media/v4l2-core/Makefile > @@ -7,15 +7,22 @@ tuner-objs := tuner-core.o > > videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ > v4l2-event.o v4l2-ctrls.o v4l2-subdev.o \ > - v4l2-async.o v4l2-common.o > + v4l2-common.o > videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o > videodev-$(CONFIG_TRACEPOINTS) += v4l2-trace.o > videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o > videodev-$(CONFIG_SPI) += v4l2-spi.o > videodev-$(CONFIG_VIDEO_V4L2_I2C) += v4l2-i2c.o > > -obj-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o > obj-$(CONFIG_VIDEO_V4L2) += videodev.o > +ifneq ($(findstring y,$(CONFIG_V4L2_ASYNC)$(CONFIG_V4L2_FWNODE)),) Hm, to me this ifdefery is an indication that we are trying to do something fishy. Regards, Ezequiel