Skip to contentSkip to conversation

video: fix SOC_CAMERA_MT9M001 build bug

PATCH In review Ingo Molnar 3 participants 9 messages Apr 28, 2008 – Apr 30, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fix SOC_CAMERA_MT9M001 build bug

on latest -git, with this config:

http://redhat.com/~mingo/misc/config-Mon_Apr_28_13_25_34_CEST_2008.bad

CONFIG_SOC_CAMERA_MT9M001=y
CONFIG_SOC_CAMERA_MT9V022=y
# CONFIG_I2C is not set

the build fails:

drivers/built-in.o: In function `reg_read':
mt9m001.c:(.text+0x140a87): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9m001.c:(.text+0x140b6e): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function reg_read':
mt9v022.c:(.text+0x1413a7): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9v022.c:(.text+0x1414ce): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function mt9m001_mod_init':
mt9m001.c:(.init.text+0x158a8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9v022_mod_init':
mt9v022.c:(.init.text+0x158b8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9m001_mod_exit':
mt9m001.c:(.exit.text+0x1656): undefined reference to i2c_del_driver' drivers/built-in.o: In function mt9v022_mod_exit':
mt9v022.c:(.exit.text+0x1666): undefined reference to `i2c_del_driver'

adding the missing I2C dependency fixes it.

---
 drivers/media/video/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/media/video/Kconfig +1 -0
Index: linux/drivers/media/video/Kconfig
===================================================================
@@ -850,6 +850,7 @@ endif # V4L_USB_DRIVERS
 config SOC_CAMERA
 	tristate "SoC camera support"
 	depends on VIDEO_V4L2
+	depends on I2C
 	select VIDEOBUF_DMA_SG
 	help
 	  SoC Camera is a common API to several cameras, not connecting
#1 lore raw
Quoted 28 lines · Ingo Molnar

on latest -git, with this config:

http://redhat.com/~mingo/misc/config-Mon_Apr_28_13_25_34_CEST_2008.bad

CONFIG_SOC_CAMERA_MT9M001=y
CONFIG_SOC_CAMERA_MT9V022=y
# CONFIG_I2C is not set

the build fails:

drivers/built-in.o: In function `reg_read':
mt9m001.c:(.text+0x140a87): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9m001.c:(.text+0x140b6e): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function reg_read':
mt9v022.c:(.text+0x1413a7): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9v022.c:(.text+0x1414ce): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function mt9m001_mod_init':
mt9m001.c:(.init.text+0x158a8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9v022_mod_init':
mt9v022.c:(.init.text+0x158b8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9m001_mod_exit':
mt9m001.c:(.exit.text+0x1656): undefined reference to i2c_del_driver' drivers/built-in.o: In function mt9v022_mod_exit':
mt9v022.c:(.exit.text+0x1666): undefined reference to `i2c_del_driver'

Quoted 3 lines

adding the missing I2C dependency fixes it.

NAK. SOC-CAMERA doesn't depend on I2C. It is also suitable for cameras, not using i2c. mt9m001 and mt9v022 do both depend on i2c.

Quoted 10 lines
---
 drivers/media/video/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Index: linux/drivers/media/video/Kconfig
===================================================================

drivers/media/video/Kconfig endif # V4L_USB_DRIVERS · line 856

Quoted 7 lines
drivers/media/video/Kconfig +1 -0
@@ -850,6 +850,7 @@ endif # V4L_USB_DRIVERS
 config SOC_CAMERA
 	tristate "SoC camera support"
 	depends on VIDEO_V4L2
+	depends on I2C
 	select VIDEOBUF_DMA_SG
 	help
 	  SoC Camera is a common API to several cameras, not connecting

Thanks
Guennadi
---
Guennadi Liakhovetski

#2 lore raw
Quoted 30 lines · Guennadi Liakhovetski
Quoted 28 lines · Ingo Molnar

on latest -git, with this config:

http://redhat.com/~mingo/misc/config-Mon_Apr_28_13_25_34_CEST_2008.bad

CONFIG_SOC_CAMERA_MT9M001=y
CONFIG_SOC_CAMERA_MT9V022=y
# CONFIG_I2C is not set

the build fails:

drivers/built-in.o: In function `reg_read':
mt9m001.c:(.text+0x140a87): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9m001.c:(.text+0x140b6e): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function reg_read':
mt9v022.c:(.text+0x1413a7): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9v022.c:(.text+0x1414ce): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function mt9m001_mod_init':
mt9m001.c:(.init.text+0x158a8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9v022_mod_init':
mt9v022.c:(.init.text+0x158b8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9m001_mod_exit':
mt9m001.c:(.exit.text+0x1656): undefined reference to i2c_del_driver' drivers/built-in.o: In function mt9v022_mod_exit':
mt9v022.c:(.exit.text+0x1666): undefined reference to `i2c_del_driver'

Quoted 6 lines
Quoted 3 lines

adding the missing I2C dependency fixes it.

NAK. SOC-CAMERA doesn't depend on I2C. It is also suitable for cameras, not using i2c. mt9m001 and mt9v022 do both depend on i2c.

as you can see it from the build log above, the compiler disagrees with you on whether the driver depends on I2C. I'm just the messenger :)

Ingo

#3 lore raw
Quoted 34 lines · Ingo Molnar
Quoted 32 lines · Guennadi Liakhovetski
Quoted 30 lines · Ingo Molnar

on latest -git, with this config:

http://redhat.com/~mingo/misc/config-Mon_Apr_28_13_25_34_CEST_2008.bad

CONFIG_SOC_CAMERA_MT9M001=y
CONFIG_SOC_CAMERA_MT9V022=y
# CONFIG_I2C is not set

the build fails:

drivers/built-in.o: In function `reg_read':
mt9m001.c:(.text+0x140a87): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9m001.c:(.text+0x140b6e): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function reg_read':
mt9v022.c:(.text+0x1413a7): undefined reference to i2c_smbus_read_word_data' drivers/built-in.o: In function reg_write':
mt9v022.c:(.text+0x1414ce): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function mt9m001_mod_init':
mt9m001.c:(.init.text+0x158a8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9v022_mod_init':
mt9v022.c:(.init.text+0x158b8): undefined reference to i2c_register_driver' drivers/built-in.o: In function mt9m001_mod_exit':
mt9m001.c:(.exit.text+0x1656): undefined reference to i2c_del_driver' drivers/built-in.o: In function mt9v022_mod_exit':
mt9v022.c:(.exit.text+0x1666): undefined reference to `i2c_del_driver'

adding the missing I2C dependency fixes it.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

NAK. SOC-CAMERA doesn't depend on I2C. It is also suitable for cameras, not using i2c. mt9m001 and mt9v022 do both depend on i2c.

as you can see it from the build log above, the compiler disagrees with you on whether the driver depends on I2C. I'm just the messenger :)

Very sorry, but I don't see it. What I see above, is that mt9m001 and mt9v022 cannot be compiled - as I said, _they_ need i2c. And I don't see a single line for soc_camera.c. SOC_CAMERA is a generic API, it shouldn't have any hardware dependencies at all. Whereas mt9v022 and mt9m001 are 2 specific i2c cameras.

Thanks
Guennadi
---
Guennadi Liakhovetski

#4 lore raw
Quoted 9 lines · Guennadi Liakhovetski
Quoted 3 lines

as you can see it from the build log above, the compiler disagrees with you on whether the driver depends on I2C. I'm just the messenger :)

Very sorry, but I don't see it. What I see above, is that mt9m001 and mt9v022 cannot be compiled - as I said, _they_ need i2c. And I don't see a single line for soc_camera.c. SOC_CAMERA is a generic API, it shouldn't have any hardware dependencies at all. Whereas mt9v022 and mt9m001 are 2 specific i2c cameras.

sorry, you are right. Mind doing the right patch as you know this code much better than i do?

Ingo

#5 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 4 lines · Guennadi Liakhovetski
Quoted 3 lines

as you can see it from the build log above, the compiler disagrees with you on whether the driver depends on I2C. I'm just the messenger :)

Quoted 8 lines
Quoted 5 lines

Very sorry, but I don't see it. What I see above, is that mt9m001 and mt9v022 cannot be compiled - as I said, _they_ need i2c. And I don't see a single line for soc_camera.c. SOC_CAMERA is a generic API, it shouldn't have any hardware dependencies at all. Whereas mt9v022 and mt9m001 are 2 specific i2c cameras.

sorry, you are right. Mind doing the right patch as you know this code much better than i do?

Ok, will do, although, the fix is just to duplicate your patch and move it from under SOC_CAMERA to MT9V022 and MT9M001. Thanks for reporting.

Guennadi
---
Guennadi Liakhovetski

#6 lore raw
In reply to Ingo Molnar
Quoted 2 lines · Ingo Molnar

sorry, you are right. Mind doing the right patch as you know this code much better than i do?

Mauro, as you've already committed Ingo's patch to your hg tree, what's the best way to fix this? Should a revert be committed, or would you drop that patch? The latter would be better, I guess, but then I better wait for you to do it, then update against your new tree, and then add a correct fix, right?

Thanks
Guennadi
---
Guennadi Liakhovetski

#7 lore raw
Quoted 10 lines · On Tue, 29 Apr 2008 13:48:21 +0200 (CEST) Guennadi Liakhovetski…
Quoted 2 lines · Ingo Molnar

sorry, you are right. Mind doing the right patch as you know this code much better than i do?

Mauro, as you've already committed Ingo's patch to your hg tree, what's the best way to fix this? Should a revert be committed, or would you drop that patch? The latter would be better, I guess, but then I better wait for you to do it, then update against your new tree, and then add a correct fix, right?

Send me a pull request with a patch reverting it and applying the proper one. I'll drop it from my patch series at -git.

Cheers,
Mauro