.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * av7110_v4l.c: av7110 video4linux interface for DVB and Siemens DVB-C analog module |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * originally based on code by: |
---|
8 | 9 | * Copyright (C) 1998,1999 Christian Theiss <mistert@rz.fh-augsburg.de> |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or |
---|
11 | | - * modify it under the terms of the GNU General Public License |
---|
12 | | - * as published by the Free Software Foundation; either version 2 |
---|
13 | | - * of the License, or (at your option) any later version. |
---|
14 | | - * |
---|
15 | | - * This program is distributed in the hope that it will be useful, |
---|
16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
18 | | - * GNU General Public License for more details. |
---|
19 | | - * To obtain the license, point your browser to |
---|
20 | | - * http://www.gnu.org/copyleft/gpl.html |
---|
21 | 10 | * |
---|
22 | 11 | * the project's page is at https://linuxtv.org |
---|
23 | 12 | */ |
---|
.. | .. |
---|
171 | 160 | buf[1] = div & 0xff; |
---|
172 | 161 | buf[2] = 0x8e; |
---|
173 | 162 | |
---|
174 | | - if (freq < (u32) (16 * 168.25)) |
---|
| 163 | + if (freq < 16U * 16825 / 100) |
---|
175 | 164 | config = 0xa0; |
---|
176 | | - else if (freq < (u32) (16 * 447.25)) |
---|
| 165 | + else if (freq < 16U * 44725 / 100) |
---|
177 | 166 | config = 0x90; |
---|
178 | 167 | else |
---|
179 | 168 | config = 0x30; |
---|
.. | .. |
---|
332 | 321 | return -EINVAL; |
---|
333 | 322 | |
---|
334 | 323 | memset(t, 0, sizeof(*t)); |
---|
335 | | - strcpy((char *)t->name, "Television"); |
---|
| 324 | + strscpy((char *)t->name, "Television", sizeof(t->name)); |
---|
336 | 325 | |
---|
337 | 326 | t->type = V4L2_TUNER_ANALOG_TV; |
---|
338 | 327 | t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO | |
---|
.. | .. |
---|
842 | 831 | if (FW_VERSION(av7110->arm_app) < 0x2623) |
---|
843 | 832 | vv_data->capabilities &= ~V4L2_CAP_SLICED_VBI_OUTPUT; |
---|
844 | 833 | |
---|
845 | | - if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) { |
---|
| 834 | + if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_VIDEO)) { |
---|
846 | 835 | ERR("cannot register capture device. skipping\n"); |
---|
847 | 836 | saa7146_vv_release(dev); |
---|
848 | 837 | return -ENODEV; |
---|