| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2013 STMicroelectronics Limited |
|---|
| 3 | 4 | * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 7 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | | - * (at your option) any later version. |
|---|
| 9 | 5 | */ |
|---|
| 10 | 6 | #include <linux/kernel.h> |
|---|
| 11 | 7 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 67 | 63 | |
|---|
| 68 | 64 | static void st_rc_send_lirc_timeout(struct rc_dev *rdev) |
|---|
| 69 | 65 | { |
|---|
| 70 | | - DEFINE_IR_RAW_EVENT(ev); |
|---|
| 71 | | - ev.timeout = true; |
|---|
| 66 | + struct ir_raw_event ev = { .timeout = true, .duration = rdev->timeout }; |
|---|
| 72 | 67 | ir_raw_event_store(rdev, &ev); |
|---|
| 73 | 68 | } |
|---|
| 74 | 69 | |
|---|
| .. | .. |
|---|
| 101 | 96 | struct st_rc_device *dev = data; |
|---|
| 102 | 97 | int last_symbol = 0; |
|---|
| 103 | 98 | u32 status, int_status; |
|---|
| 104 | | - DEFINE_IR_RAW_EVENT(ev); |
|---|
| 99 | + struct ir_raw_event ev = {}; |
|---|
| 105 | 100 | |
|---|
| 106 | 101 | if (dev->irq_wake) |
|---|
| 107 | 102 | pm_wakeup_event(dev->dev, 0); |
|---|
| .. | .. |
|---|
| 139 | 134 | mark /= dev->sample_div; |
|---|
| 140 | 135 | } |
|---|
| 141 | 136 | |
|---|
| 142 | | - ev.duration = US_TO_NS(mark); |
|---|
| 137 | + ev.duration = mark; |
|---|
| 143 | 138 | ev.pulse = true; |
|---|
| 144 | 139 | ir_raw_event_store(dev->rdev, &ev); |
|---|
| 145 | 140 | |
|---|
| 146 | 141 | if (!last_symbol) { |
|---|
| 147 | | - ev.duration = US_TO_NS(symbol); |
|---|
| 142 | + ev.duration = symbol; |
|---|
| 148 | 143 | ev.pulse = false; |
|---|
| 149 | 144 | ir_raw_event_store(dev->rdev, &ev); |
|---|
| 150 | 145 | } else { |
|---|
| .. | .. |
|---|
| 297 | 292 | rdev->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER; |
|---|
| 298 | 293 | /* rx sampling rate is 10Mhz */ |
|---|
| 299 | 294 | rdev->rx_resolution = 100; |
|---|
| 300 | | - rdev->timeout = US_TO_NS(MAX_SYMB_TIME); |
|---|
| 295 | + rdev->timeout = MAX_SYMB_TIME; |
|---|
| 301 | 296 | rdev->priv = rc_dev; |
|---|
| 302 | 297 | rdev->open = st_rc_open; |
|---|
| 303 | 298 | rdev->close = st_rc_close; |
|---|