aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drx39xyj
AgeCommit message (Collapse)Author
2021-05-21media: dvb-frontends: remove redundant words and fix several typoswengjianfeng
change 'purpous' to 'purpose'. change 'frequecy' to 'frequency'. remove redundant words struct and enum. Signed-off-by: wengjianfeng <wengjianfeng@yulong.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-11media: drxj: remove redundant assignments to variable image_to_selectColin Ian King
The variable image_to_select is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-11-16media: remove unneeded breakTom Rix
A break is not needed if it is preceded by a return Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-08-23treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-02-24media: drxj: remove redundant assignments to variable rcColin Ian King
The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-10-07media: drxj: remove redundant assignment to variable rcColin Ian King
The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-14media: media/dvb: Use kmemdup rather than duplicating its implementationFuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner
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 Gleixner
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 Chehab
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. Silva
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 Chehab
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 Chehab
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 Chehab
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 Labbe
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 Chehab
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 Chehab
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 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-19media: dvb-frontends: remove extraneous parensNick Desaulniers
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 Chehab
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 Chehab
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 Chehab
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 King
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 Kepplinger
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 Chehab
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 Chehab
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 Perches
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 Yamada
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 Yamada
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 Ailus
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 Kellermann
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Park
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 Chehab
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 ↵Markus Elfring
call "release_firmware" 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 Verkuil
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 Chehab
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 Khan
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 Khan
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 Khan
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 Khan
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 Taine
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 Bolle
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 Gennari
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 Chehab
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 Chehab
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>