From bedbef8ad3e75a304af6361af235302bcc61d06b Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 14 May 2024 06:39:01 +0000 Subject: [PATCH] 修改内核路径 --- kernel/drivers/media/radio/radio-tea5764.c | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/kernel/drivers/media/radio/radio-tea5764.c b/kernel/drivers/media/radio/radio-tea5764.c index afb7632..877a24e 100644 --- a/kernel/drivers/media/radio/radio-tea5764.c +++ b/kernel/drivers/media/radio/radio-tea5764.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * driver/media/radio/radio-tea5764.c * @@ -8,16 +9,6 @@ * Based in radio-tea5761.c Copyright (C) 2005 Nokia Corporation * * Copyright (c) 2008 Fabio Belavenuto <belavenuto@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * * History: * 2008-12-06 Fabio Belavenuto <belavenuto@gmail.com> @@ -287,12 +278,10 @@ struct tea5764_device *radio = video_drvdata(file); struct video_device *dev = &radio->vdev; - strlcpy(v->driver, dev->dev.driver->name, sizeof(v->driver)); - strlcpy(v->card, dev->name, sizeof(v->card)); + strscpy(v->driver, dev->dev.driver->name, sizeof(v->driver)); + strscpy(v->card, dev->name, sizeof(v->card)); snprintf(v->bus_info, sizeof(v->bus_info), "I2C:%s", dev_name(&dev->dev)); - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } @@ -305,7 +294,7 @@ if (v->index > 0) return -EINVAL; - strlcpy(v->name, "FM", sizeof(v->name)); + strscpy(v->name, "FM", sizeof(v->name)); v->type = V4L2_TUNER_RADIO; tea5764_i2c_read(radio); v->rangelow = FREQ_MIN * FREQ_MUL; @@ -474,6 +463,7 @@ video_set_drvdata(&radio->vdev, radio); radio->vdev.lock = &radio->mutex; radio->vdev.v4l2_dev = v4l2_dev; + radio->vdev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; /* initialize and power off the chip */ tea5764_i2c_read(radio); -- Gitblit v1.6.2