aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/mt2063.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 238Thomas Gleixner1-10/+1
Based on 2 normalized pattern(s): the original driver s license is gpl as declared with module_license 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 under version 2 of the license 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 the original driver s license is gpl as declared with module_license [copyright] [c] [2010] [2012] [mauro] [carvalho] [chehab] [driver] [modified] [by] [in] [order] [to] [work] [with] [upstream] [drxk] [driver] [and] [tons] [of] [bugs] [got] [fixed] [and] [converted] [to] [use] [dvb] [usb] [v2] 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 under version 2 of the license 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 2 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190602204654.186977917@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02media: dvb: convert tuner_info frequencies to HzMauro Carvalho Chehab1-4/+3
Right now, satellite tuner drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal tuners capable of handling both satellite and non-satelite delivery systems are appearing. We end by needing to hack the drivers in order to support such hybrid tuners. So, convert everything to specify tuner frequencies in Hz. Plese notice that a similar patch is also needed for frontends. Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Acked-by: Michael Büsch <m@bues.ch> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-01-04media: fix usage of whitespaces and on indentationMauro Carvalho Chehab1-2/+2
On several places, whitespaces are being used for indentation, or even at the end of the line. Fix them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-30media: mt2063: fix some kernel-doc warningsMauro Carvalho Chehab1-4/+2
Fix those warnings: drivers/media/tuners/mt2063.c:1413: warning: No description found for parameter 'f_ref' drivers/media/tuners/mt2063.c:1413: warning: Excess function parameter 'f_Ref' description in 'MT2063_fLO_FractionalTerm' drivers/media/tuners/mt2063.c:1476: warning: Excess function parameter 'f_Avoid' description in 'MT2063_CalcLO2Mult' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dvb_frontend: tuner_ops.release returns voidMax Kellermann1-3/+1
It is not clear what this return value means. All implemenations return 0, and the one caller ignores the value. Let's remove this useless return value completely. Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19[media] tuners: constify dvb_tuner_ops structuresJulia Lawall1-1/+1
These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct dvb_tuner_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @ok2@ identifier r.i; expression e1, e2; position p; @@ memcpy(e1, &i@p, e2) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct dvb_tuner_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct dvb_tuner_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-09[media] mt2063: use lib gcdZhaoxiu Zeng1-25/+5
This patch removes the local MT2063_gcd function, uses lib gcd instead Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17[media] dvb_frontend: get rid of set_state ops & related dataMauro Carvalho Chehab1-1/+0
The get_state()/set_state and the corresponding data types (struct tuner_state and enum tuner_param) are old DVB interfaces that came from the DVBv3 time. Nowadays, set_params() provide a better way to set the tuner and demod parameters. So, no need to keep those legacy stuff, as all drivers that were using it got converted. With this patch, all kABI elements at dvb_frontend.h are now documented. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] mt2063: fix sparse warningsHans Verkuil1-13/+13
drivers/media/tuners/mt2063.c:1238:56: warning: cast truncates bits from constant value (ffffff0f becomes f) drivers/media/tuners/mt2063.c:1313:62: warning: cast truncates bits from constant value (ffffff7f becomes 7f) drivers/media/tuners/mt2063.c:1321:62: warning: cast truncates bits from constant value (ffffff7f becomes 7f) Cast to u8 is unnecessary. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-07[media, edac] Change my email addressMauro Carvalho Chehab1-2/+2
There are several left overs with my old email address. Remove their occurrences and add myself at CREDITS, to allow people to be able to reach me on my new addresses. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-29[media] media_tree: Fix spelling errorsJonathan McCrohan1-2/+2
Fix various spelling errors in strings and comments throughout the media tree. The majority of these were found using Lucas De Marchi's codespell tool. [m.chehab@samsung.com: discard hunks with conflicts] Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2012-10-06[media] mt2063: properly handle return error codesMauro Carvalho Chehab1-18/+18
Fix a series of warnings when compiled with W=1: drivers/media/tuners/mt2063.c: In function 'mt2063_setreg': drivers/media/tuners/mt2063.c:290:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ... drivers/media/tuners/mt2063.c:2013:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/tuners/mt2063.c:2271:14: warning: no previous prototype for 'tuner_MT2063_SoftwareShutdown' [-Wmissing-prototypes] drivers/media/tuners/mt2063.c:2286:14: warning: no previous prototype for 'tuner_MT2063_ClearPowerMaskBits' [-Wmissing-prototypes] Several of those warnings are real bugs: the error status code used to be unsigned, but they're assigned to negative error codes. Fix it by using unsigned int. While here, comment the two power management functions, while we don't add a code there to properly handle tuner suspend/resume. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06[media] drivers/media/tuners/mt2063.c: Removes useless kfree()Peter Senna Tschudin1-6/+2
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab1-0/+2307
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>