invalid operands to binary &

Hi everyone,

I'm trying to build a driver under FreeBSD 8-Current, but when i'm compile, gcc return:

video.c: In function 'video_open':
video.c:1120: error: invalid operands to binary &

The line 1120 is:

sc = devclass_get_softc(video_devclass, VIDEOUNIT(dev));

I don't understand this error, do i need to include more header file ?

Thanks in advance,
Nicolas.
 
Not sure but it looks like VIDEOUNIT is a macro, it may need more parameters.
 
Hi,
Thanks for your response.
I already found the solution !

I replaced the line:
sc = devclass_get_softc(video_devclass, VIDEOUNIT(dev));

by:
sc = devclass_get_softc(video_devclass, VIDEOUNIT(dev2unit(dev)));

And it compile correctly.
Nicolas.
 
Back
Top