summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drxd_hard.c
Commit message (Collapse)AuthorAgeFilesLines
* media: drxd: make const arrays slowIncrDecLUT and fastIncrDecLUT staticColin Ian King2017-07-201-2/+4
| | | | | | | | | | | | | | Don't populate arrays slowIncrDecLUT and fastIncrDecLUT on the stack but instead make them static. Makes the object code smaller by over 100 bytes: text data bss dec hex filename 27776 832 64 28672 7000 drxd_hard.o text data bss dec hex filename 27530 976 64 28570 6f9a drxd_hard.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media drivers: annotate fall-throughMauro Carvalho Chehab2017-05-191-3/+7
| | | | | | | | | | | | | | | | | | | Avoid warnings like those: drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_detach': drivers/media/pci/ddbridge/ddbridge-core.c:787:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (input->fe) { ^ drivers/media/pci/ddbridge/ddbridge-core.c:792:2: note: here case 4: ^~~~ ... On several cases, it is just that gcc 7.1 is not capable of understanding the comment, but on other places, we need an annotation. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: Drop FSF's postal address from the source code filesSakari Ailus2017-01-271-6/+2
| | | | | | | | | | | | | | | | | | | | | Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
* [media] dvb: make DVB frontend *_ops instances "const"Max Kellermann2016-11-181-1/+1
| | | | | | | | | | | | | These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! [mchehab@s-opensource.com: fix merge conflicts] Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] drxd: use kzalloc in drxd_attach()Rasmus Villemoes2015-10-031-2/+1
| | | | | | | | This saves a little .text and removes the sizeof(...) style inconsistency. Use sizeof(*state) in accordance with CodingStyle. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab2015-06-091-1/+1
| | | | | | | | | | | | | | | | | The DVB API was originally defined using typedefs. This is against Kernel CodingStyle, and there's no good usage here. While we can't remove its usage on userspace, we can avoid its usage in Kernelspace. So, let's do it. This patch was generated by this shell script: for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done While here, make CodingStyle fixes on the affected lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
* [media] drxd: remove a dead codeMauro Carvalho Chehab2014-09-261-6/+0
| | | | | | | | | drivers/media/dvb-frontends/drxd_hard.c:2839 drxd_init() info: ignoring unreachable code. Firmware request/release is not at drxd_init. So, we can remove that dead code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] drxd_hard: fix bad alignmentsMauro Carvalho Chehab2014-09-031-1/+2
| | | | | | | | As reported by cocinelle: drivers/media/dvb-frontends/drxd_hard.c:2632:3-51: code aligned with following code on line 2633 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drxd: get rid of EXPORT_SYMBOL(drxd_config_i2c)Mauro Carvalho Chehab2014-06-171-2/+1
| | | | | | This symbol is not used externally. Get rid of it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-d: add missing braces in drxd_hard.c:DRXD_initDave Jones2014-03-111-2/+2
| | | | | | | | No functional changes, but removes a duplicate check, if !state->type_A. Signed-off-by: Dave Jones <davej@fedoraproject.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drxd_hard: fix sparse warningsHans Verkuil2013-10-171-4/+4
| | | | | | | | | | | | drivers/media/dvb-frontends/drxd_hard.c:1017:70: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drxd_hard.c:1038:69: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drxd_hard.c:2836:33: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drxd_hard.c:2972:30: warning: Using plain integer as NULL pointer Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drxd_hard: remove unused SIZEOF_ARRAYChristoph Jaeger2013-10-021-4/+0
| | | | | | | | | | | SIZEOF_ARRAY is not used (anymore). Besides, ARRAY_SIZE, defined in include/linux/kernel.h, should be used rather than explicitly coding some variant of it. Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dvb-frontends: Replace memcpy with struct assignmentEzequiel Garcia2012-12-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it's type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drxd: allow functional gate control after, attachPatrice Chotard2012-12-271-0/+4
| | | | | | | | | | | | Previously, gate control didn't work until drxd_init() execution. Migrate necessary set of commands in drxd_attach to allow gate control to be used by tuner which are accessible through i2c gate. Reported-by: frederic.mantegazza@gbiloba.org Signed-off-by: Patrice Chotard <patricechotard@free.fr> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drxd_hard: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-271-3/+5
| | | | | | | | drivers/media/dvb-frontends/drxd_hard.c:1751:5: warning: no previous prototype for 'SetOperationMode' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxd_hard.c:2615:5: warning: no previous prototype for 'DRXD_init' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxd_hard.c:2777:5: warning: no previous prototype for 'DRXD_status' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: Remove unnecessary semicolonPeter Senna Tschudin2012-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> [mchehab@redhat.com: some hunks got bitroted; applied only the ones that succeeds] Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> [crope@iki.fi: For my drivers a8293, af9013, af9015, af9035] Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab2012-08-131-0/+2992
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud