| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * IgorPlug-USB IR Receiver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * Based on the lirc_igorplugusb.c driver: |
|---|
| 10 | 11 | * Copyright (C) 2004 Jan M. Hochstein |
|---|
| 11 | 12 | * <hochstein@algo.informatik.tu-darmstadt.de> |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 14 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 15 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 16 | | - * (at your option) any later version. |
|---|
| 17 | | - * |
|---|
| 18 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 21 | | - * GNU General Public License for more details. |
|---|
| 22 | 13 | */ |
|---|
| 23 | 14 | #include <linux/device.h> |
|---|
| 24 | 15 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 56 | 47 | |
|---|
| 57 | 48 | static void igorplugusb_irdata(struct igorplugusb *ir, unsigned len) |
|---|
| 58 | 49 | { |
|---|
| 59 | | - DEFINE_IR_RAW_EVENT(rawir); |
|---|
| 50 | + struct ir_raw_event rawir = {}; |
|---|
| 60 | 51 | unsigned i, start, overflow; |
|---|
| 61 | 52 | |
|---|
| 62 | 53 | dev_dbg(ir->dev, "irdata: %*ph (len=%u)", len, ir->buf_in, len); |
|---|
| .. | .. |
|---|
| 80 | 71 | } |
|---|
| 81 | 72 | |
|---|
| 82 | 73 | do { |
|---|
| 83 | | - rawir.duration = ir->buf_in[i] * 85333; |
|---|
| 74 | + rawir.duration = ir->buf_in[i] * 85; |
|---|
| 84 | 75 | rawir.pulse = i & 1; |
|---|
| 85 | 76 | |
|---|
| 86 | 77 | ir_raw_event_store_with_filter(ir->rc, &rawir); |
|---|
| .. | .. |
|---|
| 213 | 204 | rc->priv = ir; |
|---|
| 214 | 205 | rc->driver_name = DRIVER_NAME; |
|---|
| 215 | 206 | rc->map_name = RC_MAP_HAUPPAUGE; |
|---|
| 216 | | - rc->timeout = MS_TO_NS(100); |
|---|
| 217 | | - rc->rx_resolution = 85333; |
|---|
| 207 | + rc->timeout = MS_TO_US(100); |
|---|
| 208 | + rc->rx_resolution = 85; |
|---|
| 218 | 209 | |
|---|
| 219 | 210 | ir->rc = rc; |
|---|
| 220 | 211 | ret = rc_register_device(rc); |
|---|