gentoo-overlay/media-tv/v4l-dvb-saa716x/files/v4l-dvb-saa716x-4.15-fix-timers.patch

41 lines
1.4 KiB
Diff

# Source: https://github.com/s-moch/linux-saa716x/commit/1002d79c4ba60de0dbeacba0f289119556d7450d.patch
From 1002d79c4ba60de0dbeacba0f289119556d7450d Mon Sep 17 00:00:00 2001
From: Soeren Moch <smoch@web.de>
Date: Sat, 2 Dec 2017 21:23:34 +0100
Subject: [PATCH] saa716x_ff: Convert to new timer API
Convert to new timer API in linux-4.15.
Signed-off-by: Soeren Moch <smoch@web.de>
---
drivers/media/common/saa716x/saa716x_ff_ir.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/media/common/saa716x/saa716x_ff_ir.c b/drivers/media/common/saa716x/saa716x_ff_ir.c
index ad6f38611026c..7894adff4d4f6 100644
--- a/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
+++ b/linux/drivers/media/common/saa716x/saa716x_ff_ir.c
@@ -48,9 +48,9 @@ struct infrared {
/* key-up timer */
-static void ir_emit_keyup(unsigned long parm)
+static void ir_emit_keyup(struct timer_list *t)
{
- struct infrared *ir = (struct infrared *) parm;
+ struct infrared *ir = from_timer(ir, t, keyup_timer);
if (!ir || !ir->key_pressed)
return;
@@ -184,9 +184,7 @@ int saa716x_ir_init(struct saa716x_dev *saa716x)
if (!ir)
return -ENOMEM;
- init_timer(&ir->keyup_timer);
- ir->keyup_timer.function = ir_emit_keyup;
- ir->keyup_timer.data = (unsigned long) ir;
+ timer_setup(&ir->keyup_timer, ir_emit_keyup, 0);
input_dev = input_allocate_device();
if (!input_dev)