diff options
Diffstat (limited to 'drivers/media/tuners/fc0011.c')
| -rw-r--r-- | drivers/media/tuners/fc0011.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c index 3932aa81e18c..3d3b54be2955 100644 --- a/drivers/media/tuners/fc0011.c +++ b/drivers/media/tuners/fc0011.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Fitipower FC0011 tuner driver * @@ -5,20 +6,6 @@ * * Derived from FC0012 tuner driver: * Copyright (C) 2012 Hans-Frieder Vogt <hfvogt@gmx.net> - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "fc0011.h" @@ -112,12 +99,10 @@ static int fc0011_readreg(struct fc0011_priv *priv, u8 reg, u8 *val) return 0; } -static int fc0011_release(struct dvb_frontend *fe) +static void fc0011_release(struct dvb_frontend *fe) { kfree(fe->tuner_priv); fe->tuner_priv = NULL; - - return 0; } static int fc0011_init(struct dvb_frontend *fe) @@ -262,11 +247,10 @@ static int fc0011_set_params(struct dvb_frontend *fe) regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M; break; default: - dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. " - "Using 6000 kHz.\n", + dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 6000 kHz.\n", bandwidth); bandwidth = 6000; - /* fallthrough */ + fallthrough; case 6000: regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW6M; break; @@ -349,6 +333,7 @@ static int fc0011_set_params(struct dvb_frontend *fe) switch (vco_sel) { default: WARN_ON(1); + return -EINVAL; case 0: if (vco_cal < 8) { regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); @@ -435,9 +420,7 @@ static int fc0011_set_params(struct dvb_frontend *fe) if (err) return err; - dev_dbg(&priv->i2c->dev, "Tuned to " - "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X " - "vcocal=%02X(%u) bw=%u\n", + dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n", (unsigned int)regs[FC11_REG_FA], (unsigned int)regs[FC11_REG_FP], (unsigned int)regs[FC11_REG_XINHI], @@ -480,10 +463,10 @@ static int fc0011_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) static const struct dvb_tuner_ops fc0011_tuner_ops = { .info = { - .name = "Fitipower FC0011", + .name = "Fitipower FC0011", - .frequency_min = 45000000, - .frequency_max = 1000000000, + .frequency_min_hz = 45 * MHz, + .frequency_max_hz = 1000 * MHz, }, .release = fc0011_release, @@ -516,7 +499,7 @@ struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, return fe; } -EXPORT_SYMBOL(fc0011_attach); +EXPORT_SYMBOL_GPL(fc0011_attach); MODULE_DESCRIPTION("Fitipower FC0011 silicon tuner driver"); MODULE_AUTHOR("Michael Buesch <m@bues.ch>"); |
