forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/tuners/xc4000.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Xceive XC4000 "QAM/8VSB single chip tuner"
34 *
....@@ -6,16 +7,6 @@
67 * Copyright (c) 2009 Devin Heitmueller <dheitmueller@kernellabs.com>
78 * Copyright (c) 2009 Davide Ferri <d.ferri@zero11.it>
89 * Copyright (c) 2010 Istvan Varga <istvan_v@mailbox.hu>
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 as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (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.
1910 */
2011
2112 #include <linux/module.h>
....@@ -821,7 +812,7 @@
821812 goto corrupt;
822813 }
823814
824
- priv->firm[n].ptr = kzalloc(size, GFP_KERNEL);
815
+ priv->firm[n].ptr = kmemdup(p, size, GFP_KERNEL);
825816 if (priv->firm[n].ptr == NULL) {
826817 printk(KERN_ERR "Not enough memory to load firmware file.\n");
827818 rc = -ENOMEM;
....@@ -835,7 +826,6 @@
835826 type, (unsigned long long)id, size);
836827 }
837828
838
- memcpy(priv->firm[n].ptr, p, size);
839829 priv->firm[n].type = type;
840830 priv->firm[n].id = id;
841831 priv->firm[n].size = size;
....@@ -1471,8 +1461,8 @@
14711461 if (rc < 0)
14721462 goto ret;
14731463
1474
- /* Informations from real testing of DVB-T and radio part,
1475
- coeficient for one dB is 0xff.
1464
+ /* Information from real testing of DVB-T and radio part,
1465
+ coefficient for one dB is 0xff.
14761466 */
14771467 tuner_dbg("Signal strength: -%ddB (%05d)\n", value >> 8, value);
14781468
....@@ -1754,7 +1744,7 @@
17541744 xc4000_release(fe);
17551745 return NULL;
17561746 }
1757
-EXPORT_SYMBOL(xc4000_attach);
1747
+EXPORT_SYMBOL_GPL(xc4000_attach);
17581748
17591749 MODULE_AUTHOR("Steven Toth, Davide Ferri");
17601750 MODULE_DESCRIPTION("Xceive xc4000 silicon tuner driver");