All of lore.kernel.org
 help / color / mirror / Atom feed
* videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
@ 2009-05-24 23:10 Matt Doran
  2009-05-25  0:52 ` David Ward
  2009-05-27 18:41 ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 9+ messages in thread
From: Matt Doran @ 2009-05-24 23:10 UTC (permalink / raw)
  To: linux-media

Hi there,

I tried using the latest v4l code on an Mythtv box running 2.6.20, but 
the v4l videodev module fails to load with the following warnings:

    videodev: Unknown symbol i2c_unregister_device
    v4l2_common: Unknown symbol v4l2_device_register_subdev


It seems the "i2c_unregister_device" function was added in 2.6.26.   
References to this function in v4l2-common.c are enclosed in an ifdef like:

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)


However in "v4l2_device_unregister()" in v4l2-device.c, there is a 
reference to "i2c_unregister_device" without any ifdefs.   I am running 
a pretty old kernel, but I'd guess anyone running 2.6.25 or earlier will 
have this problem.   It seems this code was added by Mauro 3 weeks ago 
in this rev:

    http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf




I also had some other compile problems, but don't have all the details 
(sorry!).  I had to disable the following drivers to get it to compile:

    * CONFIG_VIDEO_PVRUSB2
    * CONFIG_VIDEO_THS7303
    * CONFIG_VIDEO_ADV7343
    * CONFIG_DVB_SIANO_SMS1XXX


Regards,
Matt



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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-24 23:10 videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26) Matt Doran
@ 2009-05-25  0:52 ` David Ward
  2009-05-25  1:04   ` Matt Doran
  2009-05-25 18:32   ` Andy Walls
  2009-05-27 18:41 ` Mauro Carvalho Chehab
  1 sibling, 2 replies; 9+ messages in thread
From: David Ward @ 2009-05-25  0:52 UTC (permalink / raw)
  To: Matt Doran; +Cc: linux-media

On 05/24/2009 07:10 PM, Matt Doran wrote:
> Hi there,
>
> I tried using the latest v4l code on an Mythtv box running 2.6.20, but
> the v4l videodev module fails to load with the following warnings:
>
>    videodev: Unknown symbol i2c_unregister_device
>    v4l2_common: Unknown symbol v4l2_device_register_subdev
>
>
> It seems the "i2c_unregister_device" function was added in 2.6.26.
> References to this function in v4l2-common.c are enclosed in an ifdef
> like:
>
>    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
>
>
> However in "v4l2_device_unregister()" in v4l2-device.c, there is a
> reference to "i2c_unregister_device" without any ifdefs.   I am
> running a pretty old kernel, but I'd guess anyone running 2.6.25 or
> earlier will have this problem.   It seems this code was added by
> Mauro 3 weeks ago in this rev:
>
>    http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf
>
>
>
>
> I also had some other compile problems, but don't have all the details
> (sorry!).  I had to disable the following drivers to get it to compile:
>
>    * CONFIG_VIDEO_PVRUSB2
>    * CONFIG_VIDEO_THS7303
>    * CONFIG_VIDEO_ADV7343
>    * CONFIG_DVB_SIANO_SMS1XXX
>
>
> Regards,
> Matt
>

Matt, I checked out v4l-dvb today and am using it under 2.6.24 and so 
far so good.  When did the error appear -- when you were trying to load 
the module?

I have been seeing the errors compiling adv7343.c and ths7303.c under 
2.6.24 as well.  Andy Walls and Chaithrika Subrahmanya had written 
patches for those two modules respectively, but there were some comments 
during the review of the patches, so I think they are still being worked on.

David

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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-25  0:52 ` David Ward
@ 2009-05-25  1:04   ` Matt Doran
  2009-05-25 18:32   ` Andy Walls
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Doran @ 2009-05-25  1:04 UTC (permalink / raw)
  To: David Ward; +Cc: linux-media

David Ward wrote:
> On 05/24/2009 07:10 PM, Matt Doran wrote:
>> Hi there,
>>
>> I tried using the latest v4l code on an Mythtv box running 2.6.20, but
>> the v4l videodev module fails to load with the following warnings:
>>
>>    videodev: Unknown symbol i2c_unregister_device
>>    v4l2_common: Unknown symbol v4l2_device_register_subdev
>>
>
> Matt, I checked out v4l-dvb today and am using it under 2.6.24 and so 
> far so good.  When did the error appear -- when you were trying to 
> load the module?
The error appeared when trying to load the module at boot time for my 
saa7134 based tuner card.   This card would no longer work after 
installing the latest v4l code, however another tuner card continued to 
work.    Maybe because this the saa7134 card is an I2C based card and 
the other is USB based?? (but this is all a bit over my head).

I basically just commented out the "i2c_unregister_device" function in 
v4l2-device.c, recompiled and everything started working. :)    I don't 
know the implication of removing this, so I didn't submit a patch ... I 
thought I'd leave that to the experts.
>
> I have been seeing the errors compiling adv7343.c and ths7303.c under 
> 2.6.24 as well.  Andy Walls and Chaithrika Subrahmanya had written 
> patches for those two modules respectively, but there were some 
> comments during the review of the patches, so I think they are still 
> being worked on.
Great, thanks for letting me know.   It's not a showstopper, but it's a 
pain repeatedly going through the reconfigure/compile/error loop each 
time you encounter a new compiler error. :)    I'm just not game to 
upgrade the kernel on my mythtv box ... it took a long time to get 
stable, and I don't want to go there again. :P    I'm recompiling v4l 
because I added a new tuner card.

Matt

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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-25  0:52 ` David Ward
  2009-05-25  1:04   ` Matt Doran
@ 2009-05-25 18:32   ` Andy Walls
  2009-05-26  1:42     ` Matt Doran
  1 sibling, 1 reply; 9+ messages in thread
From: Andy Walls @ 2009-05-25 18:32 UTC (permalink / raw)
  To: David Ward; +Cc: Matt Doran, linux-media

On Sun, 2009-05-24 at 20:52 -0400, David Ward wrote:
> On 05/24/2009 07:10 PM, Matt Doran wrote:
> > Hi there,
> >
> > I tried using the latest v4l code on an Mythtv box running 2.6.20, but
> > the v4l videodev module fails to load with the following warnings:
> >
> >    videodev: Unknown symbol i2c_unregister_device
> >    v4l2_common: Unknown symbol v4l2_device_register_subdev
> >
> >
> > It seems the "i2c_unregister_device" function was added in 2.6.26.
> > References to this function in v4l2-common.c are enclosed in an ifdef
> > like:
> >
> >    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
> >
> >
> > However in "v4l2_device_unregister()" in v4l2-device.c, there is a
> > reference to "i2c_unregister_device" without any ifdefs.   I am
> > running a pretty old kernel, but I'd guess anyone running 2.6.25 or
> > earlier will have this problem.   It seems this code was added by
> > Mauro 3 weeks ago in this rev:
> >
> >    http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf
> >
> >
> >
> >
> > I also had some other compile problems, but don't have all the details
> > (sorry!).  I had to disable the following drivers to get it to compile:
> >
> >    * CONFIG_VIDEO_PVRUSB2
> >    * CONFIG_VIDEO_THS7303
> >    * CONFIG_VIDEO_ADV7343
> >    * CONFIG_DVB_SIANO_SMS1XXX
> >
> >
> > Regards,
> > Matt
> >
> 
> Matt, I checked out v4l-dvb today and am using it under 2.6.24 and so 
> far so good.  When did the error appear -- when you were trying to load 
> the module?
> 
> I have been seeing the errors compiling adv7343.c and ths7303.c under 
> 2.6.24 as well.  Andy Walls and Chaithrika Subrahmanya had written 
> patches for those two modules respectively, but there were some comments 
> during the review of the patches, so I think they are still being worked on.

Well, just to manage expectations: I am not working on this.  I do not
advise waiting for something from me. ;)


As an end user, you work-around is to use "make menuconfig" (or
whatever) as Matt did: disable the modules that aren't compiling on
older kernels.


If it really bugs you (it would bug me), please submit a tested patch
against:

	v4l-dvb/v4l/versions.txt

to disable compilations of the offending drivers for older kernels.

Backward compatability fixes are not going to be appealing work for
anyone, especially if you're not actually using the problem drivers.

Regards,
Andy


> David


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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-25 18:32   ` Andy Walls
@ 2009-05-26  1:42     ` Matt Doran
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Doran @ 2009-05-26  1:42 UTC (permalink / raw)
  To: Andy Walls; +Cc: David Ward, linux-media

Andy Walls wrote:
> On Sun, 2009-05-24 at 20:52 -0400, David Ward wrote:
>   
>> On 05/24/2009 07:10 PM, Matt Doran wrote:
>>     
>>> Hi there,
>>>
>>> I tried using the latest v4l code on an Mythtv box running 2.6.20, but
>>> the v4l videodev module fails to load with the following warnings:
>>>
>>>    videodev: Unknown symbol i2c_unregister_device
>>>    v4l2_common: Unknown symbol v4l2_device_register_subdev
>>>
>>>
>>> It seems the "i2c_unregister_device" function was added in 2.6.26.
>>> References to this function in v4l2-common.c are enclosed in an ifdef
>>> like:
>>>
>>>    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
>>>
>>>
>>> However in "v4l2_device_unregister()" in v4l2-device.c, there is a
>>> reference to "i2c_unregister_device" without any ifdefs.   I am
>>> running a pretty old kernel, but I'd guess anyone running 2.6.25 or
>>> earlier will have this problem.   It seems this code was added by
>>> Mauro 3 weeks ago in this rev:
>>>
>>>    http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf
>>>
>>>       
>> I have been seeing the errors compiling adv7343.c and ths7303.c under 
>> 2.6.24 as well.  Andy Walls and Chaithrika Subrahmanya had written 
>> patches for those two modules respectively, but there were some comments 
>> during the review of the patches, so I think they are still being worked on.
>>     
>
> Well, just to manage expectations: I am not working on this.  I do not
> advise waiting for something from me. ;)
>
>
> As an end user, you work-around is to use "make menuconfig" (or
> whatever) as Matt did: disable the modules that aren't compiling on
> older kernels.
>
>   
I agree, but the main problem I raise is the use of 
"i2c_unregister_device" in the main v4l module on Linux kernels that 
don't support it.

Regards,
Matt


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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-24 23:10 videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26) Matt Doran
  2009-05-25  0:52 ` David Ward
@ 2009-05-27 18:41 ` Mauro Carvalho Chehab
  2009-05-27 18:55   ` [PATCH v2] " Randy Dunlap
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2009-05-27 18:41 UTC (permalink / raw)
  To: Matt Doran; +Cc: linux-media

Em Mon, 25 May 2009 09:10:17 +1000
Matt Doran <matt.doran@papercut.com> escreveu:

> Hi there,
> 
> I tried using the latest v4l code on an Mythtv box running 2.6.20, but 
> the v4l videodev module fails to load with the following warnings:
> 
>     videodev: Unknown symbol i2c_unregister_device
>     v4l2_common: Unknown symbol v4l2_device_register_subdev
> 
> 
> It seems the "i2c_unregister_device" function was added in 2.6.26.   
> References to this function in v4l2-common.c are enclosed in an ifdef like:
> 
>     #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
> 
> 
> However in "v4l2_device_unregister()" in v4l2-device.c, there is a 
> reference to "i2c_unregister_device" without any ifdefs.   I am running 
> a pretty old kernel, but I'd guess anyone running 2.6.25 or earlier will 
> have this problem.   It seems this code was added by Mauro 3 weeks ago 
> in this rev:
> 
>     http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf

I've just applied a patch at the tree that should fix this issue. It adds
several tests and the code, but, hopefully, it should be possible even to use
the IR's with kernels starting from 2.6.16.



Cheers,
Mauro

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

* [PATCH v2] Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-27 18:41 ` Mauro Carvalho Chehab
@ 2009-05-27 18:55   ` Randy Dunlap
  2009-06-03 11:51   ` Matt Doran
       [not found]   ` <4A26637D.1070009@papercut.com>
  2 siblings, 0 replies; 9+ messages in thread
From: Randy Dunlap @ 2009-05-27 18:55 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Matt Doran, linux-media

Mauro Carvalho Chehab wrote:
> Em Mon, 25 May 2009 09:10:17 +1000
> Matt Doran <matt.doran@papercut.com> escreveu:
> 
>> Hi there,
>>
>> I tried using the latest v4l code on an Mythtv box running 2.6.20, but 
>> the v4l videodev module fails to load with the following warnings:
>>
>>     videodev: Unknown symbol i2c_unregister_device
>>     v4l2_common: Unknown symbol v4l2_device_register_subdev
>>
>>
>> It seems the "i2c_unregister_device" function was added in 2.6.26.   
>> References to this function in v4l2-common.c are enclosed in an ifdef like:
>>
>>     #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
>>
>>
>> However in "v4l2_device_unregister()" in v4l2-device.c, there is a 
>> reference to "i2c_unregister_device" without any ifdefs.   I am running 
>> a pretty old kernel, but I'd guess anyone running 2.6.25 or earlier will 
>> have this problem.   It seems this code was added by Mauro 3 weeks ago 
>> in this rev:
>>
>>     http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf
> 
> I've just applied a patch at the tree that should fix this issue. It adds
> several tests and the code, but, hopefully, it should be possible even to use
> the IR's with kernels starting from 2.6.16.


Hi Mauro,
If you are referring to my recent patch, it needs a modification to be like
other places in drivers/media/video.  Patch below applies on top of the
previous one.

---
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix v4l2-device usage of i2c_unregister_device() and handle the case of
CONFIG_I2C=m & CONFIG_MEDIA_VIDEO=y.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/media/video/v4l2-device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20090527.orig/drivers/media/video/v4l2-device.c
+++ linux-next-20090527/drivers/media/video/v4l2-device.c
@@ -85,7 +85,7 @@ void v4l2_device_unregister(struct v4l2_
 	/* Unregister subdevs */
 	list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) {
 		v4l2_device_unregister_subdev(sd);
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
 		if (sd->flags & V4L2_SUBDEV_FL_IS_I2C) {
 			struct i2c_client *client = v4l2_get_subdevdata(sd);
 


-- 
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
  2009-05-27 18:41 ` Mauro Carvalho Chehab
  2009-05-27 18:55   ` [PATCH v2] " Randy Dunlap
@ 2009-06-03 11:51   ` Matt Doran
       [not found]   ` <4A26637D.1070009@papercut.com>
  2 siblings, 0 replies; 9+ messages in thread
From: Matt Doran @ 2009-06-03 11:51 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Mauro Carvalho Chehab wrote:
> Em Mon, 25 May 2009 09:10:17 +1000
> Matt Doran <matt.doran@papercut.com> escreveu:
>
>   
>> Hi there,
>>
>> I tried using the latest v4l code on an Mythtv box running 2.6.20, but 
>> the v4l videodev module fails to load with the following warnings:
>>
>>     videodev: Unknown symbol i2c_unregister_device
>>     v4l2_common: Unknown symbol v4l2_device_register_subdev
>>
>>
>> It seems the "i2c_unregister_device" function was added in 2.6.26.   
>> References to this function in v4l2-common.c are enclosed in an ifdef like:
>>
>>     #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
>>
>>
>> However in "v4l2_device_unregister()" in v4l2-device.c, there is a 
>> reference to "i2c_unregister_device" without any ifdefs.   I am running 
>> a pretty old kernel, but I'd guess anyone running 2.6.25 or earlier will 
>> have this problem.   It seems this code was added by Mauro 3 weeks ago 
>> in this rev:
>>
>>     http://linuxtv.org/hg/v4l-dvb/rev/87afa7a4ccdf
>>     
>
> I've just applied a patch at the tree that should fix this issue. It adds
> several tests and the code, but, hopefully, it should be possible even to use
> the IR's with kernels starting from 2.6.16.
>
>
>   
Thanks Mauro. 

I've recompiled all drivers without compile error and I've been using 
everything for a few days now and it all works great.

Thanks again!
Matt


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

* Re: videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26)
       [not found]   ` <4A26637D.1070009@papercut.com>
@ 2009-06-03 12:06     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2009-06-03 12:06 UTC (permalink / raw)
  To: Matt Doran; +Cc: linux-media

Em Wed, 03 Jun 2009 21:50:21 +1000
Matt Doran <matt.doran@papercut.com> escreveu:

> Mauro Carvalho Chehab wrote:
> > Em Mon, 25 May 2009 09:10:17 +1000
> > Matt Doran <matt.doran@papercut.com> escreveu:
> >
> >   
> >> Hi there,
> >>
> >> I tried using the latest v4l code on an Mythtv box running 2.6.20, but 
> >> the v4l videodev module fails to load with the following warnings:
> >>
> >>     videodev: Unknown symbol i2c_unregister_device
> >>     v4l2_common: Unknown symbol v4l2_device_register_subdev
> >>
> > I've just applied a patch at the tree that should fix this issue. It adds
> > several tests and the code, but, hopefully, it should be possible even to use
> > the IR's with kernels starting from 2.6.16.
> >
> >
> >   
> Thanks Mauro. 
> 
> I've recompiled all drivers without compile error and I've been using 
> everything for a few days now and it all works great.

Great!
> 
> Thanks again!

Anytime.




Cheers,
Mauro

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

end of thread, other threads:[~2009-06-03 12:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-24 23:10 videodev: Unknown symbol i2c_unregister_device (in kernels older than 2.6.26) Matt Doran
2009-05-25  0:52 ` David Ward
2009-05-25  1:04   ` Matt Doran
2009-05-25 18:32   ` Andy Walls
2009-05-26  1:42     ` Matt Doran
2009-05-27 18:41 ` Mauro Carvalho Chehab
2009-05-27 18:55   ` [PATCH v2] " Randy Dunlap
2009-06-03 11:51   ` Matt Doran
     [not found]   ` <4A26637D.1070009@papercut.com>
2009-06-03 12:06     ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.