Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:42.3:Staging:A
lirc
lircd-Remove-use-of-functions-killed-in-kernel-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lircd-Remove-use-of-functions-killed-in-kernel-4.8.0.patch of Package lirc
From 6a57d48e1a233dfc55d436e8d064509cb03973d1 Mon Sep 17 00:00:00 2001 From: Alec Leamas <leamas.alec@gmail.com> Date: Fri, 19 Aug 2016 04:48:02 +0200 Subject: [PATCH 7/7] lircd: Remove use of functions killed in kernel 4.8.0 From 4.8.0 the kernel no longer supports LIRC_NOTIFY_DECODE, LIRC_SETUP_START/LIRC_SETUP_END and several constants related to initiating filters. Remove corresponding calls from lircd. --- daemons/lircd.cpp | 51 ++------------------------------------------------- lib/driver.h | 7 +++++++ 2 files changed, 9 insertions(+), 49 deletions(-) diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp index a7dbc94..a50d11f 100644 --- a/daemons/lircd.cpp +++ b/daemons/lircd.cpp @@ -464,50 +464,6 @@ static int setup_timeout(void) } -static int setup_filter(void) -{ - int ret1, ret2; - lirc_t min_pulse_supported = 0, max_pulse_supported = 0; - lirc_t min_space_supported = 0, max_space_supported = 0; - - if (!(curr_driver->features & LIRC_CAN_SET_REC_FILTER)) - return 1; - if (curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_PULSE, - &min_pulse_supported) == -1 || - curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_PULSE, &max_pulse_supported) == -1 - || curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_SPACE, &min_space_supported) == -1 - || curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_SPACE, &max_space_supported) == -1) { - log_error("could not get filter range"); - log_perror_err(__func__); - } - - if (setup_min_pulse > max_pulse_supported) - setup_min_pulse = max_pulse_supported; - else if (setup_min_pulse < min_pulse_supported) - setup_min_pulse = 0; /* disable filtering */ - - if (setup_min_space > max_space_supported) - setup_min_space = max_space_supported; - else if (setup_min_space < min_space_supported) - setup_min_space = 0; /* disable filtering */ - - ret1 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_PULSE, &setup_min_pulse); - ret2 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_SPACE, &setup_min_space); - if (ret1 == -1 || ret2 == -1) { - if (curr_driver-> - drvctl_func(LIRC_SET_REC_FILTER, - setup_min_pulse < setup_min_space ? &setup_min_pulse : &setup_min_space) == -1) { - log_error("could not set filter"); - log_perror_err(__func__); - return 0; - } - } - return 1; -} - - - - static int setup_hardware(void) { int ret = 1; @@ -516,10 +472,7 @@ static int setup_hardware(void) if ((curr_driver->features & LIRC_CAN_SET_REC_CARRIER) || (curr_driver->features & LIRC_CAN_SET_REC_TIMEOUT) || (curr_driver->features & LIRC_CAN_SET_REC_FILTER)) { - (void)curr_driver->drvctl_func(LIRC_SETUP_START, NULL); - ret = setup_frequency() && setup_timeout() - && setup_filter(); - (void)curr_driver->drvctl_func(LIRC_SETUP_END, NULL); + ret = setup_frequency() && setup_timeout(); } } return ret; @@ -2162,7 +2115,7 @@ void loop(void) int reps; if (curr_driver->drvctl_func && (curr_driver->features & LIRC_CAN_NOTIFY_DECODE)) - curr_driver->drvctl_func(LIRC_NOTIFY_DECODE, NULL); + curr_driver->drvctl_func(DRVCTL_NOTIFY_DECODE, NULL); get_release_data(&remote_name, &button_name, &reps); diff --git a/lib/driver.h b/lib/driver.h index c7c4a6a..fc7318e 100644 --- a/lib/driver.h +++ b/lib/driver.h @@ -97,6 +97,13 @@ int drv_handle_options(const char* options); /** drvctl cmd: Free memory in argument obtained using DRVCTL_GET_DEVICES. */ #define DRVCTL_FREE_DEVICES 6 +/** + * The former LIRC_NOTIFY_DECODE, informs drier that signal is successfully + * decoded e. g., to initiate some visual feedback through a LED. + */ + +#define DRVCTL_NOTIFY_DECODE 7 + /** Last well-known command. Remaining is used in driver-specific controls.*/ #define DRVCTL_MAX 128 -- 2.5.5
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