[linux-dvb] Compile error from mercurial pvrusb2-sysfs.c
mkrufky at linuxtv.org
Fri Nov 30 18:30:34 CET 2007
On Nov 30, 2007 12:15 PM, Mike Isely <isely at isely.net> 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: *** [/usr/src/v4l-dvb/v4l/pvrusb2-sysfs.o] Error 1
> > make: *** [_module_/usr/src/v4l-dvb/v4l] Error 2
> > make: Leaving directory `/usr/src/linux-184.108.40.206-cherry'
> > make: *** [default] Error 2
> > make: 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.
More information about the linux-dvb