forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/media/dvb-frontends/stv0900_core.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * stv0900_core.c
34 *
....@@ -6,17 +7,6 @@
67 * Copyright (C) ST Microelectronics.
78 * Copyright (C) 2009 NetUP Inc.
89 * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
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
- *
19
- * GNU General Public License for more details.
2010 */
2111
2212 #include <linux/kernel.h>
....@@ -203,7 +193,7 @@
203193
204194 u8 stv0900_get_bits(struct stv0900_internal *intp, u32 label)
205195 {
206
- u8 val = 0xff;
196
+ u8 val;
207197 u8 mask, pos;
208198
209199 extract_mask_pos(label, &mask, &pos);
....@@ -280,7 +270,7 @@
280270
281271 static u32 stv0900_get_mclk_freq(struct stv0900_internal *intp, u32 ext_clk)
282272 {
283
- u32 mclk = 90000000, div = 0, ad_div = 0;
273
+ u32 mclk, div, ad_div;
284274
285275 div = stv0900_get_bits(intp, F0900_M_DIV);
286276 ad_div = ((stv0900_get_bits(intp, F0900_SELX1RATIO) == 1) ? 4 : 6);
....@@ -744,12 +734,12 @@
744734 if (stv0900_get_standard(fe, demod) == STV0900_DVBS2_STANDARD) {
745735 /* DVB-S2 delineator errors count */
746736
747
- /* retreiving number for errnous headers */
737
+ /* retrieving number for errnous headers */
748738 err_val1 = stv0900_read_reg(intp, BBFCRCKO1);
749739 err_val0 = stv0900_read_reg(intp, BBFCRCKO0);
750740 header_err_val = (err_val1 << 8) | err_val0;
751741
752
- /* retreiving number for errnous packets */
742
+ /* retrieving number for errnous packets */
753743 err_val1 = stv0900_read_reg(intp, UPCRCKO1);
754744 err_val0 = stv0900_read_reg(intp, UPCRCKO0);
755745 *ucblocks = (err_val1 << 8) | err_val0;
....@@ -1967,7 +1957,7 @@
19671957 kfree(state);
19681958 return NULL;
19691959 }
1970
-EXPORT_SYMBOL(stv0900_attach);
1960
+EXPORT_SYMBOL_GPL(stv0900_attach);
19711961
19721962 MODULE_PARM_DESC(debug, "Set debug");
19731963