summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drx39xyj
Commit message (Collapse)AuthorAgeFilesLines
* drxj: comment out the unused nicam_presc_table_val tableMauro Carvalho Chehab2016-06-241-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>
* [media] drxj: don't do math if not neededMauro Carvalho Chehab2016-03-011-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>
* [media] drxj: set_param_parameters array is too shortMauro Carvalho Chehab2016-02-231-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>
* [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: replace bellow -> belowMauro Carvalho Chehab2015-05-081-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>
* [media] drx-j: Misspelled comment correctedCheolhyun Park2015-05-011-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>
* dvb-frontends: use IS_REACHABLE() instead of IS_ENABLED()Mauro Carvalho Chehab2015-04-081-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>
* [media] DVB-frontends: Deletion of unnecessary checks before the function ↵Markus Elfring2014-11-251-2/+1
| | | | | | | | | | | | | 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>
* [media] drxj: fix sparse warningsHans Verkuil2014-09-031-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>
* [media] remove some new warnings on drxjMauro Carvalho Chehab2014-07-261-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>
* [media] media: drx39xyj - use drxj_set_lna_state() and remove duplicate LNA codeShuah Khan2014-07-261-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>
* [media] media: drx39xyj - fix to return actual error codes instead of -EIOShuah Khan2014-07-261-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>
* [media] media: drx39xyj - add resume supportShuah Khan2014-07-261-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>
* [media] media: drx39xyj driver change to check fe exit flag from releaseShuah Khan2014-07-261-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>
* [media] drx-j: Use kmemdup instead of kmalloc + memcpyBenoit Taine2014-07-041-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>
* [media] drx-j: use customise option correctlyPaul Bolle2014-04-071-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>
* [media] drx39xyj: fix 64 bit division on 32 bit archGianluca Gennari2014-03-111-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>
* drx-j: Fix post-BER calculus on QAM modulationMauro Carvalho Chehab2014-03-111-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>
* drx-j: use ber_count varMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: enable DVBv5 statsMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: Fix detection of no signalMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: properly handle bit counts on statsMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: Prepare to use DVBv5 statsMauro Carvalho Chehab2014-03-112-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>
* [media] drx-j: re-add get_sig_strength()Mauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: Don't use "state" for DVB lock stateMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: get rid of some unused varsMauro Carvalho Chehab2014-03-111-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>
* [media] drx-j: propagate returned error from request_firmware()Mauro Carvalho Chehab2014-03-111-1/+1
| | | | | | | Fix a smatch warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:11711 drx_ctrl_u_code() info: why not propagate 'rc' from request_firmware() instead of (-2)? Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Fix usage of drxj_close()Mauro Carvalho Chehab2014-03-111-2/+3
| | | | | | | | | | | | This function is currently not used. However, it was meant to be called at device release. So, add it there. While here, remove the bad check, as reported by Dan, as smatch warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:20041 drxj_close() warn: variable dereferenced before check 'demod' (see line 20036) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: remove external symbolsMauro Carvalho Chehab2014-03-112-36/+6
| | | | | | | This driver doesn't export any external symbol, except for the attach() method. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: get rid of dead codeMauro Carvalho Chehab2014-03-111-8513/+0
| | | | | | | | | | | | | | | There are large chunks of code at drx-j that aren't used. Most of them are due to analog TV support. Well, just enabling them won't make analog support work, as devices with DRX and analog support requires an extra chip (avf4910). We don't have drivers for it, nor the current device that uses this frontend has support for analog TV. So, let's just get rid of this code. If latter needed, this patch can easily be reverted from git history. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: don't use mc_info before checking if its not NULLMauro Carvalho Chehab2014-03-111-2/+4
| | | | | | | | smatch warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:20803 drx_ctrl_u_code() warn: variable dereferenced before check 'mc_info' (see line 20800) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx39xxj.h: Fix undefined reference to attach functionMauro Carvalho Chehab2014-03-111-0/+6
| | | | | | | | | | | | As reported by the kbuild test robot <fengguang.wu@intel.com>: drivers/built-in.o: In function `em28xx_dvb_init': em28xx-dvb.c:(.text+0x876f2c): undefined reference to `drx39xxj_attach' That happens when CONFIG_VIDEO_EM28XX_DVB is selected, and neither CONFIG_MEDIA_SUBDRV_AUTOSELECT or DVB_DRX39XYJ is selected. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Fix dubious usage of "&" instead of "&&"Mauro Carvalho Chehab2014-03-111-6/+6
| | | | | | | | | Fixes the following warnings: drivers/media/dvb-frontends/drx39xyj/drxj.c:16764:68: warning: dubious: x & !y drivers/media/dvb-frontends/drx39xyj/drxj.c:16778:68: warning: dubious: x & !y drivers/media/dvb-frontends/drx39xyj/drxj.c:16797:68: warning: dubious: x & !y Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Don't use 0 as NULLMauro Carvalho Chehab2014-03-111-2/+3
| | | | | | | | | | Fixes the following warnings: drivers/media/dvb-frontends/drx39xyj/drxj.c:1679:65: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:1679:71: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:1681:52: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drx39xyj/drxj.c:1681:58: warning: Using plain integer as NULL pointer Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: drxj_default_aud_data_g can be staticFengguang Wu2014-03-111-1/+1
| | | | | | | | Fix sparse warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:1039:16: sparse: symbol 'drxj_default_aud_data_g' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: set it to serial mode by defaultMauro Carvalho Chehab2014-03-041-1/+1
| | | | | | | | | | | Currently, there's just one device using this frontend: PCTV 80e, and it works on serial mode. Change the default here to serial mode. If we add more devices, then this option should be set via config structure. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Properly initialize mpeg struct before using itMauro Carvalho Chehab2014-03-041-45/+11
| | | | | | | | | The cfg_mpeg_output has more fields than what it is initialized when the code is called. Be sure to initialize everything before use, in order to avoid random behaviors. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: disable OOBMauro Carvalho Chehab2014-03-041-1/+8
| | | | | | | | Just like the windows driver, disable OOB after setting the driver version. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: fix boot failure due to null pointer dereferenceShuah Khan2014-03-041-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DJH_DEBUG only code path in drxbsp_i2c_write_read() dereferences w_dev_addr and subsequently w_dev_addr->user_data->i2c which results in failure during boot. This patch fixes the null pointer derefence bug as well as the following compile errors: LD arch/x86/built-in.o CC drivers/media/dvb-frontends/drx39xyj/drxj.o drivers/media/dvb-frontends/drx39xyj/drxj.c: In function ‘drxbsp_i2c_write_read’: drivers/media/dvb-frontends/drx39xyj/drxj.c:1558:25: error: redeclaration of ‘state’ with no linkage struct drx39xxj_state *state = w_dev_addr->user_data; ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:1512:25: note: previous declaration of ‘state’ was here struct drx39xxj_state *state; ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:1558:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] struct drx39xxj_state *state = w_dev_addr->user_data; ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:1560:17: error: redeclaration of ‘msg’ with no linkage struct i2c_msg msg[2] = { ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:1513:17: note: previous declaration of ‘msg’ was here struct i2c_msg msg[2]; ^ Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: remove return that prevents DJH_DEBUG code to runShuah Khan2014-03-041-2/+0
| | | | | | | | | drxbsp_i2c_write_read() has return that prevents DJH_DEBUG code to run. Remove it. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: fix pr_dbg undefined compile errors when DJH_DEBUG is definedShuah Khan2014-03-041-3/+3
| | | | | | | | | | | | | drxj.c fails to compile with the following errors when DJH_DEBUG is defined. drivers/media/dvb-frontends/drx39xyj/drxj.c:1567:2: error: implicit declaration of function ‘pr_dbg’ [-Werror=implicit-function-declaration] pr_dbg("drx3933 i2c operation addr=%x i2c=%p, wc=%x rc=%x\n", ^ Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: be sure to do a full software resetMauro Carvalho Chehab2014-03-041-2/+9
| | | | | | | | Mimic what windows driver does here: it writes 0x07 to SIO_CC_SOFT_RST__A, instead of just 0x03. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: be sure to send the powerup command at device openMauro Carvalho Chehab2014-03-041-16/+23
| | | | | | | | | | As drxj_close puts the device in powerdown, we need to power it up properly at drxj_open. This is the behavior noticed at the Windows driver. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Use single master modeMauro Carvalho Chehab2014-03-041-1/+1
| | | | | | | | | | | | There are no other I2C masters here. Also, the Windows driver uses this mode (and both drxd and drxk Kernel drivers). So, switch to it. That helps to compare the logs between the Linux driver and the Windows one. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Allow userspace control of LNAMauro Carvalho Chehab2014-03-041-0/+41
| | | | | | | | Instead of just disabling the LNA every time, allow to control it from userspace. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: get rid of function wrappersMauro Carvalho Chehab2014-03-042-1186/+1026
| | | | | | | | | On several places, the I2C functions are just wrappers to others. Get rid of it. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: get rid of struct drx_dap_fasi_funct_gMauro Carvalho Chehab2014-03-041-30/+15
| | | | | | | | This struct contains the first abstraction layer for the I2C access routines. Get rid of it. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: get rid of drx_dap_fasi.cMauro Carvalho Chehab2014-03-043-599/+549
| | | | | | | | | | | This file contains an abstract layer for the I2C transfer functions. Get rid of it, merging it at drxj. This will allow to remove another abstraction layer there, making the code easier to read, and removing the functions that just return -EIO. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: get rid of function prototypes at drx_dap_fasi.cMauro Carvalho Chehab2014-03-041-119/+59
| | | | | | | | | | | | Reorder functions and data at drx_dap_fasi.c, in order to avoid having function prototypes. This is in preparation to merge this code inside drxj, removing some duplicated bits there, and getting rid of yet another abstraction layer. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drx-j: Get rid of I2C protocol versionMauro Carvalho Chehab2014-03-043-31/+0
| | | | | | | This is not used anywere. Get rid of it. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
OpenPOWER on IntegriCloud