aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drx39xyj (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-11/+1
Based on 3 normalized pattern(s): 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 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 [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] 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 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 [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] 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-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2-0/+2
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-01media: dvb-frontends: fix several typosMauro Carvalho Chehab4-38/+38
Use codespell to fix lots of typos over frontends. Manually verified to avoid false-positives. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-12media: drxj: fix spelling mistake in fall-through annotationsGustavo A. R. Silva1-5/+5
Replace "falltrough" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-08media: drxj: get rid of uneeded castsMauro Carvalho Chehab1-8/+8
Instead of doing casts, use %zd to print sizes, in order to make smatch happier: drivers/media/dvb-frontends/drx39xyj/drxj.c:11814 drx_ctrl_u_code() warn: argument 4 to %u specifier is cast from pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:11845 drx_ctrl_u_code() warn: argument 3 to %u specifier is cast from pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:11869 drx_ctrl_u_code() warn: argument 3 to %u specifier is cast from pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:11878 drx_ctrl_u_code() warn: argument 3 to %u specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-08media: cleanup fall-through commentsMauro Carvalho Chehab1-2/+1
As Ian pointed out, adding a '-' to the fallthrough seems to meet the regex requirements at level 3 of the warning, at least when the comment fits into a single line. So, replace by a single line the comments that were broken into multiple lines just to make gcc -Wimplicit-fallthrough=3 happy. Suggested-by: Ian Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-02media: dvb: represent min/max/step/tolerance freqs in HzMauro Carvalho Chehab1-3/+3
Right now, satellite frontend drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal frontends 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 frontends. So, convert everything to specify frontend frequencies in Hz. Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-03-06media: drx-j remove bsp_i2c.hCorentin Labbe1-139/+0
bsp_i2c.h is unused since commit ffe7c4f92183 ("[media] drx-j: Get rid of drx39xyj/bsp_tuner.h") Remove it from tree. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-04media: replace all <spaces><tab> occurrencesMauro Carvalho Chehab1-1/+1
There are a lot of places where sequences of space/tabs are found. Get rid of all spaces before tabs. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-04media: fix usage of whitespaces and on indentationMauro Carvalho Chehab1-1/+1
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-12-28media: move dvb kAPI headers to include/mediaMauro Carvalho Chehab3-3/+2
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-19media: dvb-frontends: remove extraneous parensNick Desaulniers1-1/+1
Fixes 2 warnings from Clang about extra parentheses in a conditional, that might have been meant as assignment. Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-11media: drxj: better handle errorsMauro Carvalho Chehab1-3/+7
as reported by smatch: drivers/media/dvb-frontends/drx39xyj/drxj.c:2157 drxj_dap_atomic_read_write_block() error: uninitialized symbol 'word'. The driver doesn't check if a read error occurred. Add such check. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-30media: dvb_frontends: fix kernel-doc macrosMauro Carvalho Chehab3-555/+555
Now, the Kernel checks for kernel_doc format issues. Weird enough, it didn't get any of those troubles. Shssst! Well, let's fix it, as a preventive way to avoid having hundreds of new warnings on some next Linux version. Tested by adding all files under dvb-frontends that have "/**" on them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-27media: drxj and drxk: don't produce kernel-doc warningsMauro Carvalho Chehab1-124/+124
Those drivers use a different notation for comments. While it is not worth converting to kernel-doc, removing it is also not an option. So, just replace /** by /* and be happy :-) Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20media: drxj: make several const arrays staticColin Ian King1-17/+18
Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by over 1800 bytes: Before: text data bss dec hex filename 94100 9160 0 103260 1935c drxj.o After: text data bss dec hex filename 91044 10400 0 101444 18c44 drxj.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-24media: dvb-frontends: drx39xyj: remove obsolete sign extend macrosMartin Kepplinger1-13/+0
DRX_S9TOS16 and DRX_S24TODRXFREQ are simply not used. Furthermore, sign_extend32() should be used for sign extension. (Also, the comment describing DRX_S24TODRXFREQ was wrong). So remove these macros. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-24media: Replace initalized ->initializedMauro Carvalho Chehab1-1/+1
While committing a change on em28xx, I got a warning of a typo there. So, fix it on em28xx and on two other media drivers with the same typo. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19[media] media drivers: annotate fall-throughMauro Carvalho Chehab1-9/+11
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>
2017-05-08treewide: spelling: correct diffrent[iate] and banlance typosJoe Perches1-1/+1
Add these misspellings to scripts/spelling.txt too Link: http://lkml.kernel.org/r/962aace119675e5fe87be2a88ddac1a5486f8e60.1490931810.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-09scripts/spelling.txt: add "overide" pattern and fix typo instancesMasahiro Yamada1-5/+3
Fix typos and add the following to the scripts/spelling.txt: overide||override While we are here, fix the doubled "address" in the touched line Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt. Also, fix the comment block style in the touched hunks in drivers/media/dvb-frontends/drx39xyj/drx_driver.h. Link: http://lkml.kernel.org/r/1481573103-11329-21-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27scripts/spelling.txt: add "configuartion" pattern and fix typo instancesMasahiro Yamada3-12/+12
Fix typos and add the following to the scripts/spelling.txt: configuartion||configuration While we are here, fix the "ouput" as well in the touched hunk in drivers/media/dvb-frontends/drx39xyj/drx_driver.h. Link: http://lkml.kernel.org/r/1481573103-11329-23-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-01-27[media] media: Drop FSF's postal address from the source code filesSakari Ailus1-4/+0
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>
2016-11-18[media] dvb: make DVB frontend *_ops instances "const"Max Kellermann1-2/+2
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>
2016-06-24drxj: comment out the unused nicam_presc_table_val tableMauro Carvalho Chehab1-0/+3
Avoid this warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:1243:18: warning: 'nicam_presc_table_val' defined but not used [-Wunused-const-variable=] static const u16 nicam_presc_table_val[43] = { ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-03-01[media] drxj: don't do math if not neededMauro Carvalho Chehab1-4/+5
While there's no risk of divison by zero, the logic there is akward, as it does the calculus for the numerator and denominator before checking if this will be used. Change the order to check first if the denominator is zero, and only calculating the numerator/denominator if not. This should also avoid those smatch errors: drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-23[media] drxj: set_param_parameters array is too shortMauro Carvalho Chehab1-1/+1
Fixes this smatch warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:4151 drxj_dap_scu_atomic_read_write_block() error: buffer overflow 'set_param_parameters' 15 <= 17 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab1-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/*
2015-05-08media: replace bellow -> belowMauro Carvalho Chehab1-1/+1
Bellow is yelling. Ok, sometimes the code is yells a lot, but but this is not the case there ;) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] drx-j: Misspelled comment correctedCheolhyun Park1-19/+19
Fix several typos inside the driver's comments. Signed-off-by: Cheolhyun Park <pch851130@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08dvb-frontends: use IS_REACHABLE() instead of IS_ENABLED()Mauro Carvalho Chehab1-1/+1
Changeset 9b174527e7b7 added this new macro, ensuring that it is true only if the function is actually reachable. However, newer drivers were added since when it was written. So, change those drivers to also use it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25[media] DVB-frontends: Deletion of unnecessary checks before the function call "release_firmware"Markus Elfring1-2/+1
GIT_AUTHOR_DATE=1416472432 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] drxj: fix sparse warningsHans Verkuil1-19/+19
drivers/media/dvb-frontends/drx39xyj/drxj.c:11768:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11768:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11768:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11768:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11770:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11770:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11770:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11770:25: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11794:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11796:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11796:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11796:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11796:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11798:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11798:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11798:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11798:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11800:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11800:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11800:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11800:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11605:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11605:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11605:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11605:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11632:29: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11632:29: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11632:29: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11632:29: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11650:34: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11652:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11652:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11652:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11652:34: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11654:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11654:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11654:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11654:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11656:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11656:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11656:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11656:33: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11670:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11670:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11670:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11670:35: warning: cast to restricted __be16 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11678:47: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11680:46: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 drivers/media/dvb-frontends/drx39xyj/drxj.c:11682:51: warning: cast to restricted __be32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] remove some new warnings on drxjMauro Carvalho Chehab1-4/+0
changeset b601fe5688ae did some cleanup, but didn't remove some now unused vars: drivers/media/dvb-frontends/drx39xyj/drxj.c: In function 'drx39xxj_set_frontend': drivers/media/dvb-frontends/drx39xyj/drxj.c:12072:21: warning: unused variable 'uio_data' [-Wunused-variable] drivers/media/dvb-frontends/drx39xyj/drxj.c: In function 'drx39xxj_set_lna': drivers/media/dvb-frontends/drx39xyj/drxj.c:12230:21: warning: unused variable 'uio_data' [-Wunused-variable] drivers/media/dvb-frontends/drx39xyj/drxj.c:12229:20: warning: unused variable 'uio_cfg' [-Wunused-variable] drivers/media/dvb-frontends/drx39xyj/drxj.c:12224:6: warning: unused variable 'result' [-Wunused-variable] Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] media: drx39xyj - use drxj_set_lna_state() and remove duplicate LNA codeShuah Khan1-27/+2
drx39xxj_set_lna() and drx39xxj_set_frontend() set LNA. Instead of duplicating LNA configure code, change to use drxj_set_lna_state() which sets LNA to the caller requested state (on or off). Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] media: drx39xyj - fix to return actual error codes instead of -EIOShuah Khan1-56/+56
Several functions ignore the return values in error legs and always return -EIO. This makes it hard to debug and take proper action in calling routines. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] media: drx39xyj - add resume supportShuah Khan1-23/+42
drx39xyj driver lacks resume support. Add support by changing its fe ops init interface to detect the resume status by checking fe exit flag and do the necessary initialization. With this change, driver resume correctly in both dvb adapter is not in use and in use by an application cases. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] media: drx39xyj driver change to check fe exit flag from releaseShuah Khan1-1/+3
Change drx39xyj_release() to check fe exit flag to detect the device disconnect state and avoid accessing the device after it has been removed. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] drx-j: Use kmemdup instead of kmalloc + memcpyBenoit Taine1-8/+6
This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-07[media] drx-j: use customise option correctlyPaul Bolle1-1/+1
The Kconfig entry for "Micronas DRX-J demodulator" defaults to modular if DVB_FE_CUSTOMISE is set. But that Kconfig symbol was replaced with MEDIA_SUBDRV_AUTOSELECT as of v3.7. So use the new symbol. And negate the logic, because MEDIA_SUBDRV_AUTOSELECT's logic is the opposite of the former logic. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx39xyj: fix 64 bit division on 32 bit archGianluca Gennari1-1/+5
Fix this linker warning: WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined! [m.chehab@samsung.com: add include for asm/div64.h] Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11drx-j: Fix post-BER calculus on QAM modulationMauro Carvalho Chehab1-1/+2
There are two troubles there: 1) the bit error measure were not accumulating; 2) it was missing the bit count. Fix them. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11drx-j: use ber_count varMauro Carvalho Chehab1-1/+1
drivers/media/dvb-frontends/drx39xyj/drxj.c: In function 'ctrl_get_qam_sig_quality': drivers/media/dvb-frontends/drx39xyj/drxj.c:9468:6: warning: variable 'ber_cnt' set but not used [-Wunused-but-set-variable] u32 ber_cnt = 0; /* BER count */ ^ By reading the comment, it is said that BER should be calculated as: qam_pre_rs_ber = frac_times1e6( ber_cnt, rs_bit_cnt ); Also, it makes sense to take the mantissa into account, so fix the code to do what's commented. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: enable DVBv5 statsMauro Carvalho Chehab1-4/+25
Now that everything is set, let's enable DVBv5 stats, for applications that support it. DVBv3 apps will still work. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: Fix detection of no signalMauro Carvalho Chehab1-0/+3
When the signal is 7, it means that no signal was received. Value experimentally measured. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: properly handle bit counts on statsMauro Carvalho Chehab1-39/+50
Instead of just assuming that the min resolution is 1E-6, pass both bit error and bit counts for userspace to calculate BER. The same applies for PER, for 8VSB. It is not clear how to get the packet count for QAM. So, for now, don't expose PER for QAM. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: Prepare to use DVBv5 statsMauro Carvalho Chehab2-220/+125
Convert the stats internally to use DVBv5. For now, it will keep showing everything via DVBv3 API only, as the .len value were not initialized. That allows testing if the new stats code didn't break anything. A latter patch will add the final bits for the DVBv5 stats to fully work. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: re-add get_sig_strength()Mauro Carvalho Chehab1-0/+77
We'll need to use this function. Restore it from the git history. This function will be used on the next patch. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: Don't use "state" for DVB lock stateMauro Carvalho Chehab1-11/+11
State is already used on other places for the state struct. Don't use it here, to avoid troubles with latter patches. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx-j: get rid of some unused varsMauro Carvalho Chehab1-4/+0
As reported when compiled with W=1: drivers/media/dvb-frontends/drx39xyj/drxj.c: In function ‘ctrl_set_channel’: drivers/media/dvb-frontends/drx39xyj/drxj.c:10340:26: warning: variable ‘common_attr’ set but not used [-Wunused-but-set-variable] struct drx_common_attr *common_attr = NULL; ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:10336:6: warning: variable ‘intermediate_freq’ set but not used [-Wunused-but-set-variable] s32 intermediate_freq = 0; Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>