ljalves / linux_media

TBS linux open source drivers
https://github.com/ljalves/linux_media/wiki
Other
89 stars 150 forks source link

Unable to build on Ubuntu Xenial x64 (4.4.0-28): implicit declaration of function 'i2c_mux_priv' #135

Closed DJBenson closed 8 years ago

DJBenson commented 8 years ago

Trying to build on Ubuntu Xenial and the build is failing with implicit declaration of function 'i2c_mux_priv'.

I've captured some of the build output which can be found at: http://paste.ubuntu.com/18418668/

/home/jonathan/tbs/media_build/v4l/si2168.c: In function 'si2168_select': /home/jonathan/tbs/media_build/v4l/si2168.c:575:30: error: implicit declaration of function 'i2c_mux_priv' [-Werror=implicit-function-declaration] struct i2c_client _client = i2c_mux_priv(muxc); ^ /home/jonathan/tbs/media_build/v4l/si2168.c:575:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] /home/jonathan/tbs/media_build/v4l/si2168.c: In function 'si2168_deselect': /home/jonathan/tbs/media_build/v4l/si2168.c:595:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct i2c_client client = i2c_mux_priv(muxc); ^ /home/jonathan/tbs/media_build/v4l/si2168.c: In function 'si2168_probe': /home/jonathan/tbs/media_build/v4l/si2168.c:669:14: error: implicit declaration of function 'i2c_mux_alloc' [-Werror=implicit-function-declaration] dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, ^ /home/jonathan/tbs/media_build/v4l/si2168.c:670:13: error: 'I2C_MUX_LOCKED' undeclared (first use in this function) 1, 0, I2C_MUX_LOCKED, ^ /home/jonathan/tbs/media_build/v4l/si2168.c:670:13: note: each undeclared identifier is reported only once for each function it appears in /home/jonathan/tbs/media_build/v4l/si2168.c:676:11: error: dereferencing pointer to incomplete type 'struct i2c_mux_core' dev->muxc->priv = client; ^ /home/jonathan/tbs/media_build/v4l/si2168.c:677:8: error: implicit declaration of function 'i2c_mux_add_adapter' [-Werror=implicit-function-declaration] ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); ^ /home/jonathan/tbs/media_build/v4l/si2168.c: In function 'si2168_remove': /home/jonathan/tbs/media_build/v4l/si2168.c:708:2: error: implicit declaration of function 'i2c_mux_del_adapters' [-Werror=implicit-function-declaration] i2c_mux_del_adapters(dev->muxc); ^ cc1: some warnings being treated as errors make[3]: _* [/home/jonathan/tbs/media_build/v4l/si2168.o] Error 1 make[2]: * [module/home/jonathan/tbs/media_build/v4l] Error 2 make[1]: * [default] Error 2 make: *\ [all] Error 2

DJBenson commented 8 years ago

Building as root seems to resolve this. Closing.