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

[media] drivers/media: fix dependencies in video mt9t001/mt9p031

Both mt9t001.c and mt9p031.c have two identical issues, those
being that they will need module.h inclusion for the upcoming
cleanup going on there, and that their dependencies don't limit
selection of configs that will fail to compile as follows:

The related config options are CONFIG_MEDIA_CONTROLLER and
CONFIG_VIDEO_V4L2_SUBDEV_API. Looking at the code, it appears
that the driver was never intended to work without these enabled,
so add a dependency on CONFIG_VIDEO_V4L2_SUBDEV_API, which in
turn already has a dependency on CONFIG_MEDIA_CONTROLLER.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Paul Gortmaker and committed by
Mauro Carvalho Chehab
86caf811 d56ae6fb

+4 -2
+2 -2
drivers/media/video/Kconfig
··· 469 469 470 470 config VIDEO_MT9P031 471 471 tristate "Aptina MT9P031 support" 472 - depends on I2C && VIDEO_V4L2 472 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 473 473 ---help--- 474 474 This is a Video4Linux2 sensor-level driver for the Aptina 475 475 (Micron) mt9p031 5 Mpixel camera. 476 476 477 477 config VIDEO_MT9T001 478 478 tristate "Aptina MT9T001 support" 479 - depends on I2C && VIDEO_V4L2 479 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 480 480 ---help--- 481 481 This is a Video4Linux2 sensor-level driver for the Aptina 482 482 (Micron) mt0t001 3 Mpixel camera.
+1
drivers/media/video/mt9p031.c
··· 14 14 15 15 #include <linux/delay.h> 16 16 #include <linux/device.h> 17 + #include <linux/module.h> 17 18 #include <linux/i2c.h> 18 19 #include <linux/log2.h> 19 20 #include <linux/pm.h>
+1
drivers/media/video/mt9t001.c
··· 13 13 */ 14 14 15 15 #include <linux/i2c.h> 16 + #include <linux/module.h> 16 17 #include <linux/log2.h> 17 18 #include <linux/slab.h> 18 19 #include <linux/videodev2.h>