hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/media/rc/sir_ir.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IR SIR driver, (C) 2000 Milan Pikula <www@fornax.sk>
34 *
45 * sir_ir - Device driver for use with SIR (serial infra red)
56 * mode of IrDA on many notebooks.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
117 */
128
139 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -96,7 +92,7 @@
9692
9793 static void add_read_queue(int flag, unsigned long val)
9894 {
99
- DEFINE_IR_RAW_EVENT(ev);
95
+ struct ir_raw_event ev = {};
10096
10197 pr_debug("add flag %d with val %lu\n", flag, val);
10298
....@@ -114,7 +110,7 @@
114110 } else {
115111 val += TIME_CONST / 2;
116112 }
117
- ev.duration = US_TO_NS(val);
113
+ ev.duration = val;
118114
119115 ir_raw_event_store_with_filter(rcdev, &ev);
120116 }