public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] video: fix SOC_CAMERA_MT9M001 build bug
@ 2008-04-28 12:00 Ingo Molnar
  2008-04-28 17:46 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2008-04-28 12:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-kernel


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.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/media/video/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Index: linux/drivers/media/video/Kconfig
===================================================================
--- linux.orig/drivers/media/video/Kconfig
+++ 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 12:00 [patch] video: fix SOC_CAMERA_MT9M001 build bug Ingo Molnar
@ 2008-04-28 17:46 ` Guennadi Liakhovetski
  2008-04-28 19:31   ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Guennadi Liakhovetski @ 2008-04-28 17:46 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Mauro Carvalho Chehab, linux-kernel

On Mon, 28 Apr 2008, Ingo Molnar wrote:

> 
> 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.
> 
> Signed-off-by: Ingo Molnar <mingo@elte.hu>

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.

> ---
>  drivers/media/video/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: linux/drivers/media/video/Kconfig
> ===================================================================
> --- linux.orig/drivers/media/video/Kconfig
> +++ 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
> 

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 17:46 ` Guennadi Liakhovetski
@ 2008-04-28 19:31   ` Ingo Molnar
  2008-04-28 19:41     ` Guennadi Liakhovetski
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2008-04-28 19:31 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Mauro Carvalho Chehab, linux-kernel


* Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> On Mon, 28 Apr 2008, Ingo Molnar wrote:
> 
> > 
> > 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.
> > 
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 19:31   ` Ingo Molnar
@ 2008-04-28 19:41     ` Guennadi Liakhovetski
  2008-04-28 20:11       ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Guennadi Liakhovetski @ 2008-04-28 19:41 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Mauro Carvalho Chehab, linux-kernel

On Mon, 28 Apr 2008, Ingo Molnar wrote:

> * Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> 
> > On Mon, 28 Apr 2008, Ingo Molnar wrote:
> > 
> > > 
> > > 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.
> > > 
> > > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > 
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 19:41     ` Guennadi Liakhovetski
@ 2008-04-28 20:11       ` Ingo Molnar
  2008-04-28 20:17         ` Guennadi Liakhovetski
  2008-04-29 11:48         ` Guennadi Liakhovetski
  0 siblings, 2 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-04-28 20:11 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Mauro Carvalho Chehab, linux-kernel


* Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 20:11       ` Ingo Molnar
@ 2008-04-28 20:17         ` Guennadi Liakhovetski
  2008-04-29 11:48         ` Guennadi Liakhovetski
  1 sibling, 0 replies; 9+ messages in thread
From: Guennadi Liakhovetski @ 2008-04-28 20:17 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Mauro Carvalho Chehab, linux-kernel

On Mon, 28 Apr 2008, Ingo Molnar wrote:

> 
> * Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> 
> > > 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?

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-28 20:11       ` Ingo Molnar
  2008-04-28 20:17         ` Guennadi Liakhovetski
@ 2008-04-29 11:48         ` Guennadi Liakhovetski
  2008-04-29 20:03           ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 9+ messages in thread
From: Guennadi Liakhovetski @ 2008-04-29 11:48 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Mauro Carvalho Chehab, linux-kernel

On Mon, 28 Apr 2008, Ingo Molnar wrote:

> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-29 11:48         ` Guennadi Liakhovetski
@ 2008-04-29 20:03           ` Mauro Carvalho Chehab
  2008-04-30  9:35             ` Guennadi Liakhovetski
  0 siblings, 1 reply; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2008-04-29 20:03 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Ingo Molnar, linux-kernel

On Tue, 29 Apr 2008 13:48:21 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> On Mon, 28 Apr 2008, Ingo Molnar wrote:
> 
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] video: fix SOC_CAMERA_MT9M001 build bug
  2008-04-29 20:03           ` Mauro Carvalho Chehab
@ 2008-04-30  9:35             ` Guennadi Liakhovetski
  0 siblings, 0 replies; 9+ messages in thread
From: Guennadi Liakhovetski @ 2008-04-30  9:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Ingo Molnar, linux-kernel

On Tue, 29 Apr 2008, Mauro Carvalho Chehab wrote:

> 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.

Mauro, you should be able to get both fixes from

http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

now...

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-30  9:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 12:00 [patch] video: fix SOC_CAMERA_MT9M001 build bug Ingo Molnar
2008-04-28 17:46 ` Guennadi Liakhovetski
2008-04-28 19:31   ` Ingo Molnar
2008-04-28 19:41     ` Guennadi Liakhovetski
2008-04-28 20:11       ` Ingo Molnar
2008-04-28 20:17         ` Guennadi Liakhovetski
2008-04-29 11:48         ` Guennadi Liakhovetski
2008-04-29 20:03           ` Mauro Carvalho Chehab
2008-04-30  9:35             ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox