- 03 Mar, 2015 24 commits
-
-
Mauro Carvalho Chehab authored
Fix a few minor CodingStyle issues at the source code: - Use proper multi-line comments; - Align the log tables; - Remove the .type from dvb_frontend_ops, since this is not needed anymore (since the drivers conversion to DVBv5); - Remove emacs format macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Fix most of checkpatch warnings like: WARNING: line over 80 characters Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Ideally, we should be replacing this function by intlog10(). While we don't do that, let's at least constify the tables, in order to remove its code footfrint, and get rid of nelems. This also fixes a few 80-cols CodingStyle warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
WARNING: braces {} are not necessary for any arm of this statement + if (ret == 0) { [...] + } else { [...] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Get rid of the remaining checkpatch.pl warnings: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
The logic there is too complex and it looks like an inifite loop. So, simplify the logic and implement it as a for loop. This gets rid of the following checkpatch.pl warnings: WARNING: else is not generally useful after a break or return + return LG3306_UNLOCK; + } else { WARNING: else is not generally useful after a break or return + return LG3306_UNLOCK; + } else { Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Use pr_foo() where there's a direct replacement. For debug, use custom-made macros, for now, as there are 3 different debug levels. We should get rid of those some day, specially since several such macros can be just removed, as Kernel trace would provide about the same output. This gets rid of some checkpatch errors: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... +#define lg_info(fmt, arg...) printk(KERN_INFO "lgdt3306a: " fmt, ##arg) ERROR: Macros with complex values should be enclosed in parentheses +#define lg_dbg(fmt, arg...) if (debug & DBG_INFO) \ + lg_printk(KERN_DEBUG, fmt, ##arg) ERROR: Macros with complex values should be enclosed in parentheses +#define lg_reg(fmt, arg...) if (debug & DBG_REG) \ + lg_printk(KERN_DEBUG, fmt, ##arg) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Fix this CodingStyle error: ERROR: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so ag$ #56: FILE: drivers/media/dvb-frontends/lgdt3306a.c:19: + * along with this program; if not, write to the Free Software$ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Fixes the following smatch errors: drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_set_if': drivers/media/dvb-frontends/lgdt3306a.c:695:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_monitor_vsb': drivers/media/dvb-frontends/lgdt3306a.c:1033:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_check_oper_mode': drivers/media/dvb-frontends/lgdt3306a.c:1082:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_check_lock_status': drivers/media/dvb-frontends/lgdt3306a.c:1109:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_check_neverlock_status': drivers/media/dvb-frontends/lgdt3306a.c:1185:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_pre_monitoring': drivers/media/dvb-frontends/lgdt3306a.c:1199:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ drivers/media/dvb-frontends/lgdt3306a.c: In function 'lgdt3306a_get_packet_error': drivers/media/dvb-frontends/lgdt3306a.c:1310:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
As warned by smatch: drivers/media/dvb-frontends/lgdt3306a.c:1354 log10_x1000() error: buffer overflow 'valx_x10' 14 <= 14 drivers/media/dvb-frontends/lgdt3306a.c:1355 log10_x1000() error: buffer overflow 'log10x_x1000' 14 <= 14 There's a potential of returning a value out of the buffer. Fix it. While here, remove the ugly braced block. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Fix two smatch warnings: drivers/media/dvb-frontends/lgdt3306a.h:53:28: error: dubious one-bit signed bitfield drivers/media/dvb-frontends/lgdt3306a.h:56:33: error: dubious one-bit signed bitfield Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Simplify the check if CONFIG_DVB_LGDT3306A is enabled, use the IS_ENABLED() macro, just like the other frontend modules. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
While this is not a mandatory rule at the CodingStyle, we prefer hexadecimal values in lowercase. Currently, there's a mix of lowercase and uppercase ons at lgdt3306a. So, convert all to lowercase with this small script: perl -ne 'if (m,0x([\dA-F]+),) { $o=$1; $n=lc $1; s,0x($o),0x$n, } print $_' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
Just CodingStyle. No functional changes. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
fix WARNING: 'supress' may be misspelled - perhaps 'suppress'? Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
Properly indent register initialization tables. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
Replace C99 comments by /* */ blocks. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
We should not be using typedefs at the Kernel, as this makes harder for reviewers to understand the code. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
Just CodingStyle fix. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
Fixes CodingStyle error: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
No need for an else, as the previous if will return. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Michael Ira Krufky authored
No functional changes. Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Fred Richter authored
This ATSC/QAM-B demodulator is used by several new devices. Add support for it. Other patches will fix CodingStyle issues. Signed-off-by: Fred Richter <frichter@hauppauge.com> Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
The documentation of the xvYCC601 Y'CbCr encoding was part of the SMPTE 170M (SDTV) colorspace, but it should have been part of the Rec. 709 (HDTV) colorspace as per the xvYCC standard. This change only affects the documentation and not any code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 02 Mar, 2015 16 commits
-
-
Hans Verkuil authored
The handling of VIDIOC_G/S_PRIORITY is now entirely done by the V4L2 core, so we can drop the g/s_priority ioctl ops. We do have to make sure though that when S_PRIORITY is called we check that the driver used struct v4l2_fh. This check can be removed once all drivers are converted to that structure. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
By using struct v4l2_fh both the prio handling and the linked list implementation in pvrusb2 can be removed since both are now done in the v4l2 core if you use struct v4l2_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
To keep V4L2 drivers that did not yet convert to unlocked_ioctl happy, the v4l2 core had a .ioctl file operation that took a V4L2 lock. The last drivers are now converted to unlocked_ioctl, so all this old code can now be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
The V4L2 core will warn if this is not done. Unfortunately this driver wasn't updated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
Instead of .ioctl use unlocked_ioctl. This allows us to finally remove the old .ioctl op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
Switch this driver over to the V4L2 core locking mechanism in preparation for switching to unlocked_ioctl. Suggested by Laurent Pinchart. This patch introduces a new mutex at the struct uvc_video level and drops the old mutex at the queue level. The new lock is now used for all ioctl locking and in the release file operation (the driver always has to take care of locking in file operations, the core only serializes ioctls). Note that the mmap and get_unmapped_area file operations no longer take a lock. Commit f035eb4e fixed a AB-BA deadlock by moving all the locking down into vb2, so the mmap and get_unmapped_area file operations should no longer do any locking before calling into vb2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
This driver does its own locking, so there is no need to use ioctl instead of unlocked_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans Verkuil authored
As far as I can tell pvrusb2 does its own locking, so there is no need to use .ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Pablo Anton authored
It is confusing which parts of the driver are adv7604 specific, adv7611 specific or common for both. This patch renames any adv7604 prefixes (both for functions and defines) to adv76xx whenever they are common. Signed-off-by: Pablo Anton <pablo.anton@vodalys-labs.com> Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> [hans.verkuil@cisco.com: rebased and renamed ADV76xx_fsc to ADV76XX_FSC] [hans.verkuil@cisco.com: kept the existing adv7604 driver name] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Nicholas Mc Guire authored
Add handling for timeout case. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Nicholas Mc Guire authored
wait_for_completion_timeout() returns unsigned long not int. This assigns the return value to an appropriately typed variable (also helps keep static code checkers happy). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
jean-michel.hautbois@vodalys.com authored
The bits are the same, but register is 0xf4 on ADV7611 instead of 0xfc. When reading back the value in log_status, differentiate both. Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Nicholas Mc Guire authored
return type of wait_for_completion_timeout is unsigned long not int. A appropriately named variable of type unsigned long is added and the assignments fixed up. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Luis de Bethencourt authored
Integer return of bcm2048_parse_rds_rt () is never used, changing the return type to void. Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
jean-michel.hautbois@vodalys.com authored
The CP_NON_STD_VIDEO bit indicates an input not aligned with DV timings. If there is no input, and chip is in free run mode, consider we are locked. Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> [hans.verkuil@cisco.com: put both conditions in one 'if'] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Markus Elfring authored
The video_unregister_device() 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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-