summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/horus3a.c
AgeCommit message (Collapse)Author
2018-08-02media: dvb: convert tuner_info frequencies to HzMauro Carvalho Chehab
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>
2017-12-28media: move dvb kAPI headers to include/mediaMauro Carvalho Chehab
Except for DVB, all media kAPI headers are at include/media. Move the headers to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-15media: dvb-frontends: fix i2c access helpers for KASANArnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with with CONFIG_KASAN on gcc-5/6/7: drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] drivers/media/dvb-frontends/cxd2841er.c:3404:1: error: the frame size of 3136 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] drivers/media/dvb-frontends/stv0367.c:3143:1: error: the frame size of 4016 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] drivers/media/dvb-frontends/stv090x.c:3430:1: error: the frame size of 5312 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] drivers/media/dvb-frontends/stv090x.c:4248:1: error: the frame size of 4872 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] gcc-8 now solves this by consolidating the stack slots for the argument variables, but on older compilers we can get the same behavior by taking the pointer of a local variable rather than the inline function argument. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-24treewide: Fix typos in printkMasanari Iida
This patch fix some spelling typos found in printk. [jkosina@suse.cz: drop arch/arm64/kernel/hibernate.c that was already in place] Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-18[media] dvb_frontend: tuner_ops.release returns voidMax Kellermann
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] dvb-frontends: constify dvb_tuner_ops structuresJulia Lawall
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-07[media] Fix DVB-S/S2 tune for sony ascot3a tunerAbylay Ospan
* fix buffer length check * do not rely on ROLLOFF Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-16[media] horus3a: fix compiler warningHans Verkuil
Shut up this compiler warning that I get during the daily build: horus3a.c: In function 'horus3a_set_params': horus3a.c:308:24: warning: 'rolloff' may be used uninitialized in this function [-Wmaybe-uninitialized] symbol_rate * (100 + rolloff), 200000) + 5; ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11[media] horus3a: don't use variable length arraysMauro Carvalho Chehab
The Linux stack is short; we need to be able to count the number of bytes used at stack on each function. So, we don't like to use variable-length arrays, as complained by smatch: drivers/media/dvb-frontends/horus3a.c:57:19: warning: Variable length array is used. The max usecase of the driver seems to be 5 bytes + 1 for the register. So, let's be safe and allocate 6 bytes for the write buffer. This should be enough to cover all cases. If not, let's print an error message. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11[media] horus3a: Sony Horus3A DVB-S/S2 tuner driverKozlov Sergey
Add DVB-S/S2 frontend driver for Sony Horus3A (CXD2832AER) chip Signed-off-by: Kozlov Sergey <serjk@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>