... virtual_touchscreen/virtual_touchscreen.c: In function ‘virt_ts_init’:
./include/linux/init.h:184:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
184
#define THIS_MODULE (&__this_module)
~^~~~~~~
struct module *
... virtual_touchscreen.c:77:23: note: in expansion of macro ‘THIS_MODULE’
77 | cl = class_create(THIS_MODULE, DEVICE_NAME);
./include/linux/device/class.h:228:54: note: expected ‘const char ’ but argument is of type ‘struct module ’
I could solve this issue by removing the first argument of the class_create function so:
77 | cl = class_create(DEVICE_NAME);
And the make runs perfectly, creates the .ko file that I needed.
When I try to run
make
command, I get an error:I could solve this issue by removing the first argument of the class_create function so:
77 | cl = class_create(DEVICE_NAME);
And the make runs perfectly, creates the .ko file that I needed.