Re: compile error media-build on 4.15 because of 'device_get_match_data'

2018-05-05 Thread Jasmin J.
Hello!

I just pushed a fix to media-build.
But I had to disable the driver for Kernels older than 4.16.
-> VIDEO_I2C requires device_get_match_data which requires
   the function pointer device_get_match_data in fwnode_operations.
The latter has been added first in Kernel 4.16.

If someone wants to have VIDEO_I2C in Kernels older than 4.16,
please provide patch.

BR,
   Jasmin


compile error media-build on 4.15 because of 'device_get_match_data'

2018-05-05 Thread Martin Dauskardt
I tried to compile media-build on Ubuntu 18.04. (gcc 7.3.0) with Kernel 
4.15 and get this error:



/home/martin/media_build/v4l/video-i2c.c: In function 'video_i2c_probe':
/home/martin/media_build/v4l/video-i2c.c:456:16: error: implicit 
declaration of function 'device_get_match_data'; did you mean 
'of_device_get_match_data'? [-Werror=implicit-function-declaration]

   data->chip = device_get_match_data(>dev);
    ^
    of_device_get_match_data
/home/martin/media_build/v4l/video-i2c.c:456:14: warning: assignment 
makes pointer from integer without a cast [-Wint-conversion]

   data->chip = device_get_match_data(>dev);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:339: recipe for target 
'/home/martin/media_build/v4l/video-i2c.o' failed

make[3]: *** [/home/martin/media_build/v4l/video-i2c.o] Error 1
Makefile:1552: recipe for target '_module_/home/martin/media_build/v4l' 
failed

make[2]: *** [_module_/home/martin/media_build/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Verzeichnis „/home/martin/media_build/v4l“ wird verlassen
Makefile:26: recipe for target 'all' failed
make: *** [all] Error 2
build failed at ./build line 526

I hope it is possible to integrate a patch for Kernel 4.15