w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
" error: unknown field ‘compat_ioctl’ specified in initializer " while creating dummy ioctl

The ioctl has been changed for a reason and it would be best if you follow the kernel changes in your driver too. You can not use drivers compiled for one version in another. The change is not too difficult one.

In the fops structure change

ioctl to unlocked_ioctl

and in the ioctl function in your driver, do not pass the inode pointer. That is all, the rest of the code can remain the same.

see this tutorial for more details





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.