media: atomisp: add I2C dependency
Subsystems (4)
PATCH 1/1 media: atomisp: add I2C dependency
From: Arnd Bergmann <[email protected]>
Without CONFIG_I2C, atomisp fails to build because of a missing function declaration:
drivers/staging/media/atomisp/pci/atomisp_v4l2.c: In function 'atomisp_subdev_probe':drivers/staging/media/atomisp/pci/atomisp_v4l2.c:960:21: error: implicit declaration of function 'i2c_get_adapter'; did you mean 'i2c_get_adapdata'? [-Werror=implicit-function-declaration]
960 | i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
| ^~~~~~~~~~~~~~~
| i2c_get_adapdataIdeally the driver should just move away from calling i2c_get_adapter as explained in a comment near the call. For now, just use a Kconfig dependency. Apparently configurations with I2C disabled are rare in practice as well as in randconfig builds because a lot of other drivers 'select' the subsystem.
--- drivers/staging/media/atomisp/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/staging/media/atomisp/Kconfig +1 -0
@@ -13,6 +13,7 @@ config VIDEO_ATOMISP tristate "Intel Atom Image Signal Processor Driver" depends on VIDEO_DEV && INTEL_ATOMISP depends on PMIC_OPREGION + depends on I2C select IOSF_MBI select VIDEOBUF2_VMALLOC select VIDEO_V4L2_SUBDEV_API
Signature · 1 line
2.39.0
Hi Arnd,
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Without
CONFIG_I2C, atomisp fails to build because of a missing function declaration:
drivers/staging/media/atomisp/pci/atomisp_v4l2.c: In function 'atomisp_subdev_probe':drivers/staging/media/atomisp/pci/atomisp_v4l2.c:960:21: error: implicit declaration of function 'i2c_get_adapter'; did you mean 'i2c_get_adapdata'? [-Werror=implicit-function-declaration]960 | i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id); | ^~~~~~~~~~~~~~~ | i2c_get_adapdata
Quoted 7 lines
Ideally the driver should just move away from calling
i2c_get_adapteras explained in a comment near the call. For now, just use aKconfigdependency. Apparently configurations with I2C disabled are rare in practice as well as in randconfig builds because a lot of other drivers 'select' the subsystem.Signed-off-by Arnd Bergmann <[email protected]>
Actually the i2c_get_adapter() call is gone in the atomisp pull-req which I send to Mauro for 6.3, it is removed by this patch.
So adding the I2C dependency is no longer necessary.
Regards,
Hans
Quoted 16 lines
--- drivers/staging/media/atomisp/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/staging/media/atomisp/Kconfig +1
-0@@ -13,6 +13,7 @@ config VIDEO_ATOMISP tristate "Intel Atom Image Signal Processor Driver" depends on VIDEO_DEV && INTEL_ATOMISP depends on PMIC_OPREGION + depends on I2C select IOSF_MBI select VIDEOBUF2_VMALLOC select VIDEO_V4L2_SUBDEV_API
Quoted 8 lines · Hans de Goede
On 2/2/23 22:02, Arnd Bergmann wrote:
Actually the
i2c_get_adapter()call is gone in the atomisp pull-req which I send to Mauro for 6.3, it is removed by this patch.So adding the I2C dependency is no longer necessary.
Ok, nice timing then, I must have done thousands of randconfig builds with atomisp enabled without ever hitting it until today ;-)
Arnd