| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * DVB USB framework |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2004-6 Patrick Boettcher <patrick.boettcher@posteo.de> |
|---|
| 5 | 6 | * Copyright (C) 2012 Antti Palosaari <crope@iki.fi> |
|---|
| 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. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License along |
|---|
| 18 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 19 | | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 20 | 7 | */ |
|---|
| 21 | 8 | |
|---|
| 22 | 9 | #include "dvb_usb_common.h" |
|---|
| .. | .. |
|---|
| 74 | 61 | if (!d->props->i2c_algo) |
|---|
| 75 | 62 | return 0; |
|---|
| 76 | 63 | |
|---|
| 77 | | - strlcpy(d->i2c_adap.name, d->name, sizeof(d->i2c_adap.name)); |
|---|
| 64 | + strscpy(d->i2c_adap.name, d->name, sizeof(d->i2c_adap.name)); |
|---|
| 78 | 65 | d->i2c_adap.algo = d->props->i2c_algo; |
|---|
| 79 | 66 | d->i2c_adap.dev.parent = &d->udev->dev; |
|---|
| 80 | 67 | i2c_set_adapdata(&d->i2c_adap, d); |
|---|
| .. | .. |
|---|
| 163 | 150 | dev->map_name = d->rc.map_name; |
|---|
| 164 | 151 | dev->allowed_protocols = d->rc.allowed_protos; |
|---|
| 165 | 152 | dev->change_protocol = d->rc.change_protocol; |
|---|
| 153 | + dev->timeout = d->rc.timeout; |
|---|
| 166 | 154 | dev->priv = d; |
|---|
| 167 | 155 | |
|---|
| 168 | 156 | ret = rc_register_device(dev); |
|---|
| .. | .. |
|---|
| 957 | 945 | if (d->props->identify_state) { |
|---|
| 958 | 946 | const char *name = NULL; |
|---|
| 959 | 947 | ret = d->props->identify_state(d, &name); |
|---|
| 960 | | - if (ret == 0) { |
|---|
| 961 | | - ; |
|---|
| 962 | | - } else if (ret == COLD) { |
|---|
| 948 | + if (ret == COLD) { |
|---|
| 963 | 949 | dev_info(&d->udev->dev, |
|---|
| 964 | 950 | "%s: found a '%s' in cold state\n", |
|---|
| 965 | 951 | KBUILD_MODNAME, d->name); |
|---|
| .. | .. |
|---|
| 984 | 970 | } else { |
|---|
| 985 | 971 | goto err_free_all; |
|---|
| 986 | 972 | } |
|---|
| 987 | | - } else { |
|---|
| 973 | + } else if (ret != WARM) { |
|---|
| 988 | 974 | goto err_free_all; |
|---|
| 989 | 975 | } |
|---|
| 990 | 976 | } |
|---|