Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
bbswitch.16042
0001-Update-proc_create_call-for-5.6-kernel.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Update-proc_create_call-for-5.6-kernel.patch of Package bbswitch.16042
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 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bbswitch.c b/bbswitch.c index 341608f..2934b5a 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -35,8 +35,9 @@ #include <linux/suspend.h> #include <linux/seq_file.h> #include <linux/pm_runtime.h> +#include <linux/proc_fs.h> -#define BBSWITCH_VERSION "0.8" #+#define BBSWITCH_VERSION "0.9" +#define BBSWITCH_VERSION "0.8" MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Toggle the discrete graphics card"); @@ -375,12 +376,12 @@ static int bbswitch_pm_handler(struct notifier_block *nbp, 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 = { @@ -457,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;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor