diff --git a/nuc_led.c b/nuc_led.c index c975f22..c488eb5 100644 --- a/nuc_led.c +++ b/nuc_led.c @@ -30,6 +30,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include @@ -443,11 +444,18 @@ static ssize_t acpi_proc_read(struct file *filp, char __user *buff, return ret; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) +static struct proc_ops proc_acpi_operations = { + .proc_read = acpi_proc_read, + .proc_write = acpi_proc_write, +}; +#else static struct file_operations proc_acpi_operations = { .owner = THIS_MODULE, .read = acpi_proc_read, .write = acpi_proc_write, }; +#endif /* Init & unload */ static int __init init_nuc_led(void)