roadrunner2/macbook12-spi-driver

Driver doesn't compile for 5.9.0+ - iio_priv_to_dev() helper migration

joax opened this issue · 1 comments

joax commented

The helper is decommissioned from iio so this driver (apple-ib-als.c in particular) needs a different strategy to access the private components of the device. I am trying to re code to this new world, I will post a PR soon unless you have one already in the making.

make[1]: Entering directory '/mnt/bb8956c1-8d7f-4076-a76b-4d4443586eea/repos/linux-git'
  CC [M]  /usr/src/apple-ibridge-0.2/apple-ib-als.o
/usr/src/apple-ibridge-0.2/apple-ib-als.c: In function ‘appleals_config_iio’:
/usr/src/apple-ibridge-0.2/apple-ib-als.c:469:28: error: implicit declaration of function ‘iio_priv_to_dev’ [-Werror=implicit-function-declaration]
  469 |  struct iio_dev *iio_dev = iio_priv_to_dev(als_dev);
      |                            ^~~~~~~~~~~~~~~
/usr/src/apple-ibridge-0.2/apple-ib-als.c:469:28: warning: initialization of ‘struct iio_dev *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /usr/src/apple-ibridge-0.2/apple-ib-als.o] Error 1
make[1]: *** [Makefile:1788: /usr/src/apple-ibridge-0.2] Error 2
make[1]: Leaving directory '/mnt/bb8956c1-8d7f-4076-a76b-4d4443586eea/repos/linux-git'
make: *** [Makefile:13: all] Error 2

Had the same error. I used this to patch mine.