Re: Compile error from mercurial pvrusb2-sysfs.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 30, 2007 12:15 PM, Mike Isely <isely@xxxxxxxxx> wrote:
> On Fri, 30 Nov 2007, Dave Schile wrote:
>
> >
> > I tried to compile from mercurial last night (11/29/07) and got this error. Anyone have any ideas?
> >
> > CC [M]  /usr/src/v4l-dvb/v4l/pvrusb2-sysfs.o
> > /usr/src/v4l-dvb/v4l/pvrusb2-sysfs.c: In function 'class_dev_create':
> > /usr/src/v4l-dvb/v4l/pvrusb2-sysfs.c:808: error: 'struct device' has no
> > /member named 'class'
> > make[3]: *** [/usr/src/v4l-dvb/v4l/pvrusb2-sysfs.o] Error 1
> > make[2]: *** [_module_/usr/src/v4l-dvb/v4l] Error 2
> > make[2]: Leaving directory `/usr/src/linux-2.6.17.8-cherry'
> > make[1]: *** [default] Error 2
> > make[1]: Leaving directory `/usr/src/v4l-dvb/v4l'
> > make: *** [all] Error 2
> >
> > Thank you,
> > Dave
>
> The programmatic method for doing sysfs class entries changed, starting
> with kernel 2.6.18.  The pvrusb2 driver was recently updated to use the
> new method - because the old method is deprecated and not long for this
> world.  Unfortunately (and not surprisingly) the new method fails to
> compile for anything older than 2.6.18.  Two things you can do now: Turn
> off CONFIG_VIDEO_PVRUSB2_SYSFS which should disable this feature in the
> driver and avoid compiling the problematic code.  Or build for 2.6.18 or
> later.  Or if you don't care about the pvrusb2 driver at all and are
> just trying to build the repository, turn off CONFIG_VIDEO_PVRUSB2.
>
> This needs a real fix in v4l-dvb or it must at least be made harmless.
> I had initially ruled out a pile of ifdef's because (1) there will be
> quite a few, and (2) it's only going to get worse because the new method
> also allows for additional cleanups in this module and doing those
> cleanups while still retaining the old method for backwards
> compatibility is going to get really grim.  Probably a better solution
> for now is just to automatically kill CONFIG_VIDEO_PVRUSB2_SYSFS for
> kernels older than 2.6.18 and accept that the driver's sysfs interface
> won't be present for older kernels.
>
> I will take another look at this issue later on this weekend.

I suggest moving "VIDEO_PVRUSB2_SYSFS" from the [2.6.13] section of
v4l/versions.txt into the [2.6.18] (or later) section.  It's not
exactly a FIX, persay... but it is a harmless workaround that will
suffice for now.

Regards,

Mike Krufky

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux