[linux-dvb] Compile error from mercurial pvrusb2-sysfs.c
isely at isely.net
Fri Nov 30 18:15:09 CET 2007
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-126.96.36.199-cherry'
> make: *** [default] Error 2
> make: Leaving directory `/usr/src/v4l-dvb/v4l'
> make: *** [all] Error 2
> Thank you,
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.
| Mike Isely | PGP fingerprint
Spammers Die!! | | 03 54 43 4D 75 E5 CC 92
| isely @ pobox (dot) com | 71 16 01 E2 B5 F5 C1 E8
More information about the linux-dvb