File 0001-Update-proc_create_call-for-5.6-kernel.patch of Package bbswitch

From 314d223a1d1bab86370c2da3771b76bf8ac93e3b Mon Sep 17 00:00:00 2001
From: Adrian Curless <awcurless@wpi.edu>
Date: Tue, 31 Mar 2020 22:43:28 -0400
Subject: [PATCH] Update proc_create call to pass proc_ops instead of
 file_operations, a change made in 5.6

Modified by Antonio Larrosa <alarrosa@suse.com> to not bump the version number
since the patch was done by a fork of the upstream project [1] and the only
change it does is to fix it to build with the new kernel.

[1] https://github.com/awcurless/bbswitch/commit/314d223a1d1bab86370c2da3771b76bf8ac93e3b
---
 bbswitch.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/bbswitch.c
+++ b/bbswitch.c
@@ -376,12 +376,12 @@ static int bbswitch_pm_handler(struct no
     return 0;
 }
 
-static struct file_operations bbswitch_fops = {
-    .open   = bbswitch_proc_open,
-    .read   = seq_read,
-    .write  = bbswitch_proc_write,
-    .llseek = seq_lseek,
-    .release= single_release
+static struct proc_ops bbswitch_ops = {
+    .proc_open = bbswitch_proc_open,
+    .proc_read = seq_read,
+    .proc_write = bbswitch_proc_write,
+    .proc_lseek = seq_lseek,
+    .proc_release = single_release,
 };
 
 static struct notifier_block nb = {
@@ -458,7 +458,7 @@ static int __init bbswitch_init(void) {
         }
     }
 
-    acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
+    acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_ops);
     if (acpi_entry == NULL) {
         pr_err("Couldn't create proc entry\n");
         return -ENOMEM;
openSUSE Build Service is sponsored by