diff -up bbswitch-0.8/bbswitch.c.5.6fix bbswitch-0.8/bbswitch.c --- bbswitch-0.8/bbswitch.c.5.6fix 2020-04-27 21:03:31.374417071 -0400 +++ bbswitch-0.8/bbswitch.c 2020-04-28 20:10:56.479080120 -0400 @@ -35,6 +35,10 @@ #include #include #include +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) +#include +#endif #define BBSWITCH_VERSION "0.8" @@ -375,6 +379,15 @@ static int bbswitch_pm_handler(struct no return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) +static struct proc_ops bbswitch_fops = { + .proc_open = bbswitch_proc_open, + .proc_read = seq_read, + .proc_write = bbswitch_proc_write, + .proc_lseek = seq_lseek, + .proc_release= single_release +}; +#else static struct file_operations bbswitch_fops = { .open = bbswitch_proc_open, .read = seq_read, @@ -382,6 +395,7 @@ static struct file_operations bbswitch_f .llseek = seq_lseek, .release= single_release }; +#endif static struct notifier_block nb = { .notifier_call = &bbswitch_pm_handler