forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/common/siano/smscoreapi.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Siano core API module
34 *
....@@ -6,15 +7,6 @@
67 * author: Uri Shkolnik
78 *
89 * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation;
13
- *
14
- * Software distributed under the License is distributed on an "AS IS"
15
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
16
- *
17
- * See the GNU General Public License for more details.
1810 */
1911
2012 #include "smscoreapi.h"
....@@ -238,8 +230,8 @@
238230 [MSG_SMS_FLASH_DL_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_FLASH_DL_REQ",
239231 [MSG_SMS_EXEC_TEST_1_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_EXEC_TEST_1_REQ",
240232 [MSG_SMS_EXEC_TEST_1_RES - MSG_TYPE_BASE_VAL] = "MSG_SMS_EXEC_TEST_1_RES",
241
- [MSG_SMS_ENBALE_TS_INTERFACE_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_ENBALE_TS_INTERFACE_REQ",
242
- [MSG_SMS_ENBALE_TS_INTERFACE_RES - MSG_TYPE_BASE_VAL] = "MSG_SMS_ENBALE_TS_INTERFACE_RES",
233
+ [MSG_SMS_ENABLE_TS_INTERFACE_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_ENABLE_TS_INTERFACE_REQ",
234
+ [MSG_SMS_ENABLE_TS_INTERFACE_RES - MSG_TYPE_BASE_VAL] = "MSG_SMS_ENABLE_TS_INTERFACE_RES",
243235 [MSG_SMS_SPI_SET_BUS_WIDTH_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_SPI_SET_BUS_WIDTH_REQ",
244236 [MSG_SMS_SPI_SET_BUS_WIDTH_RES - MSG_TYPE_BASE_VAL] = "MSG_SMS_SPI_SET_BUS_WIDTH_RES",
245237 [MSG_SMS_SEND_EMM_REQ - MSG_TYPE_BASE_VAL] = "MSG_SMS_SEND_EMM_REQ",
....@@ -450,7 +442,7 @@
450442 entry = kmalloc(sizeof(*entry), GFP_KERNEL);
451443 if (entry) {
452444 entry->mode = default_mode;
453
- strlcpy(entry->devpath, devpath, sizeof(entry->devpath));
445
+ strscpy(entry->devpath, devpath, sizeof(entry->devpath));
454446 list_add(&entry->entry, &g_smscore_registry);
455447 } else
456448 pr_err("failed to create smscore_registry.\n");
....@@ -735,7 +727,7 @@
735727 dev->postload_handler = params->postload_handler;
736728
737729 dev->device_flags = params->flags;
738
- strlcpy(dev->devpath, params->devpath, sizeof(dev->devpath));
730
+ strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
739731
740732 smscore_registry_settype(dev->devpath, params->device_type);
741733