hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/dvb-frontends/dib0070.c
....@@ -1,23 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Linux-DVB Driver for DiBcom's DiB0070 base-band RF Tuner.
34 *
45 * Copyright (C) 2005-9 DiBcom (http://www.dibcom.fr/)
56 *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License as
8
- * published by the Free Software Foundation; either version 2 of the
9
- * License, or (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful, but
12
- * WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- *
15
- * GNU General Public License for more details.
16
- *
17
- *
187 * This code is more or less generated from another driver, please
198 * excuse some codingstyle oddities.
20
- *
219 */
2210
2311 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -201,7 +189,8 @@
201189
202190 adc = dib0070_read_reg(state, 0x19);
203191
204
- dprintk("CAPTRIM=%hd; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32) adc*(u32)1800/(u32)1024);
192
+ dprintk("CAPTRIM=%d; ADC = %hd (ADC) & %dmV\n", state->captrim,
193
+ adc, (u32)adc * (u32)1800 / (u32)1024);
205194
206195 if (adc >= 400) {
207196 adc -= 400;
....@@ -212,7 +201,8 @@
212201 }
213202
214203 if (adc < state->adc_diff) {
215
- dprintk("CAPTRIM=%hd is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff);
204
+ dprintk("CAPTRIM=%d is closer to target (%hd/%hd)\n",
205
+ state->captrim, adc, state->adc_diff);
216206 state->adc_diff = adc;
217207 state->fcaptrim = state->captrim;
218208 }
....@@ -376,7 +366,7 @@
376366 }
377367
378368 if (*tune_state == CT_TUNER_START) {
379
- dprintk("Tuning for Band: %hd (%d kHz)\n", band, freq);
369
+ dprintk("Tuning for Band: %d (%d kHz)\n", band, freq);
380370 if (state->current_rf != freq) {
381371 u8 REFDIV;
382372 u32 FBDiv, Rest, FREF, VCOF_kHz;
....@@ -454,12 +444,17 @@
454444 dib0070_write_reg(state, 0x20,
455445 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001 | state->current_tune_table_index->tuner_enable);
456446
457
- dprintk("REFDIV: %hd, FREF: %d\n", REFDIV, FREF);
447
+ dprintk("REFDIV: %u, FREF: %d\n", REFDIV, FREF);
458448 dprintk("FBDIV: %d, Rest: %d\n", FBDiv, Rest);
459
- dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1);
460
- dprintk("HFDIV code: %hd\n", state->current_tune_table_index->hfdiv);
461
- dprintk("VCO = %hd\n", state->current_tune_table_index->vco_band);
462
- dprintk("VCOF: ((%hd*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq);
449
+ dprintk("Num: %u, Den: %u, SD: %d\n", (u16)Rest, Den,
450
+ (state->lo4 >> 12) & 0x1);
451
+ dprintk("HFDIV code: %u\n",
452
+ state->current_tune_table_index->hfdiv);
453
+ dprintk("VCO = %u\n",
454
+ state->current_tune_table_index->vco_band);
455
+ dprintk("VCOF: ((%u*%d) << 1))\n",
456
+ state->current_tune_table_index->vco_multi,
457
+ freq);
463458
464459 *tune_state = CT_TUNER_STEP_0;
465460 } else { /* we are already tuned to this frequency - the configuration is correct */
....@@ -767,7 +762,7 @@
767762 fe->tuner_priv = NULL;
768763 return NULL;
769764 }
770
-EXPORT_SYMBOL(dib0070_attach);
765
+EXPORT_SYMBOL_GPL(dib0070_attach);
771766
772767 MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>");
773768 MODULE_DESCRIPTION("Driver for the DiBcom 0070 base-band RF Tuner");