summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-06[media] media: vb2: fix handling MAPPED buffer flagMarek Szyprowski
MAPPED flag was set for the buffer only if all it's planes were mapped and relied on a simple mapping counter. This assumption is really bogus, especially because the buffers may be mapped multiple times. Also the meaning of this flag for muliplane buffers was not really useful. This patch fixes this issue by setting the MAPPED flag for the buffer if any of it's planes is in use (what means that has been mapped at least once), so MAPPED flag can be used as 'in_use' indicator. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] media: vb2: add a check if queued userptr buffer is large enoughMarek Szyprowski
Videobuf2 accepted any userptr buffer without verifying if its size is large enough to store the video data from the driver. The driver reports the minimal size of video data once in queue_setup and expects that videobuf2 provides buffers that match these requirements. This patch adds the required check. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] media: mem2mem: eliminate possible NULL pointer dereferenceAndrzej Pietrasiewicz
This patch removes the possible NULL pointer dereference in mem2mem code. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] media: v4l: remove single to multiplane conversionTomasz Stanislawski
This patch removes an implicit conversion between multi and single plane formats from V4L2 framework. The conversion is to be performed by libv4l2. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] v4l2-ioctl: more -ENOTTY fixesHans Verkuil
explicitly instead of using a macro. ioctls and the ENUMSTD, S_STD and G_PARM ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] ivtv: fill in service_setHans Verkuil
The service_set field of struct v4l2_sliced_vbi_cap was never filled in. The v4l2-compliance tool complained about this, so this is now fixed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] vivi: fill in colorspaceHans Verkuil
The colorspace was never filled in, causing complaints from v4l2-compliance. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] dvb_frontend: fix compile warningHans Verkuil
Andreas Oberritter <obi@linuxtv.org> has looked at this and agreed that it is safe to remove the 'timeout' variable. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] si470x: fix compile warningHans Verkuil
Tobias Lorenz <tobias.lorenz@gmx.net> has looked at this and agreed that the 'buf' variable could be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] vpx3220, bt819: fix compiler warningsHans Verkuil
Same status/res mixup. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] drxd_hard: fix compiler warningsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] mantis: fix compiler warningsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] az6027: fix compiler warningsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] tvaudio: fix compiler warningsHans Verkuil
This is indeed a bug: balance and volume must be used to set the left and right channel volume. Fixed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] af9005-fe: fix compiler warningHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] mxl5005s: fix compiler warningHans Verkuil
Removed the unused Xtal_Int variable. That made it also possible to remove a related function. However, the code of that function has been preserved in a comment describing an equation. Without that function that comment would have been hard to understand. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] ddbridge: fix compiler warningsHans Verkuil
'off' was unused and 'ret' really had to be used to return -EFAULT. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] saa7146: fix compiler warningHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] wl128x: fix compiler warning + wrong write() returnHans Verkuil
The fix is to check for ret and return -EFAULT if non-zero. I also noticed that write() didn't return the number of bytes written. Fixed as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] mt20xx.c: fix compiler warningsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] radio-si4713.c: fix compiler warningHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] dvb-usb: refactor MFE code for individual streaming config per frontendMichael Krufky
refactor MFE code to allow for individual streaming configuration for each frontend Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] dvb-usb: add ATSC support for the Hauppauge WinTV-Aero-MMichael Krufky
Adds new driver, mxl111sf, to support the WinTV-Aero-M Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04[media] drxd: fix divide errorEdward Sheldrake
Fix division by zero in drxd triggered by running "femon" before any DVB tuning has been done (by "scandvb" or anything else). Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04[media] gspca: Use current logging stylesJoe Perches
Add pr_fmt. Convert usb style logging macros to pr_<level>. Remove now unused old usb style logging macros. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04[media] DVB: dvb_frontend: check function pointers on reinitializeAndreas Oberritter
Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] t613: Use current logging stylesJoe Perches
Add pr_fmt. Convert usb style logging macros to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] sn9c20x: Use current logging stylesJoe Perches
Add pr_fmt. Convert usb style logging macros to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] pac207: Use current logging stylesJoe Perches
Add pr_fmt. Convert usb style logging macros to pr_<level>. Coalesce formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] finepix: Use current logging stylesJoe Perches
Add pr_fmt. Convert usb style logging macros to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] m5602: Use current logging stylesJoe Perches
Add pr_fmt and convert usb style logging macro uses to pr_<level>. Coalesce format strings. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] gl860: Use current logging stylesJoe Perches
Add pr_fmt. Convert err macro use to pr_err. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] et61x251: Use current logging stylesJoe Perches
Add pr_fmt and convert printks to pr_<level> Remove explicit prefixes from logging messages. One of the prefixes was defective, a copy/paste error. Use ##__VA_ARGS__ for variadic macros. Whitespace neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] bt8xx: Use current logging stylesJoe Perches
This converts some messages that were emitted at KERN_INFO to KERN_DEBUG. All of these messages were guarded by bttv_debug tests. Add pr_fmt. Convert printks to pr_<level> Convert printks without KERN_<level> to appropriate pr_<level>. Removed embedded prefixes when pr_fmt was added. Whitespace cleanups when around other conversions. Macros coded with if statements should be do { if... } while (0) so the macros can be used in other if tests. Use ##__VA_ARGS__ for variadic macro as well. Coalesce format strings. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] winbond-cir: Use current logging stylesJoe Perches
Add pr_fmt, convert printks to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] ene_ir: Use current logging stylesJoe Perches
Add pr_fmt. Convert ene_warn and ene_notice to pr_<level>. Use pr_debug in __dbg macro and a little neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] rc-core.h: Surround macro with do {} while (0)Joe Perches
Macros coded with if statements should be do { if... } while (0) so the macros can be used in other if tests. Use ##__VA_ARGS__ for variadic macro as well. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] saa7146: Use current logging stylesJoe Perches
Standardize the mechanisms to emit logging messages. A few other modules used an #include from saa7146, convert those at the same time. Add pr_fmt. Convert printks to pr_<level> Convert printks without KERN_<level> to appropriate pr_<level>. Convert logging macros requiring multiple parentheses to normal style. Removed embedded prefixes when pr_fmt was added. Whitespace cleanups when around other conversions. Use printf extension %pM to print mac address. Coalesce format strings. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Michael Hunold <michael@mihu.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: don't sleep on disconnectChris Rankin
The DVB framework will try to power-down an adapter that no-one is using any more, but this assumes that the adapter is still connected to the machine. That's not always true for a USB adapter, so disable the sleep operations when the adapter has been physically unplugged. This prevents I2C write failures with error -19 from appearing occasionally in the dmesg log. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: move printk lines outside mutex lockChris Rankin
There's no reason to still be holding the device list mutex for either of these printk statements. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: clean up resources should init failChris Rankin
This patch ensures that the em28xx_init_dev() function cleans up after itself, in the event that it fails. This isimportant because the struct em28xx will be deallocated if em28xx_init_dev() returns an error. [mchehab@redhat.com: Fix merge conflicts and simplify the goto labels] Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: use atomic bit operations for devices-in-use maskChris Rankin
Use atomic bit operations for the em28xx_devused mask, to prevent an unlikely race condition should two adapters be plugged in simultaneously. The operations also clearer than explicit bit manipulation anyway. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: pass correct buffer size to snprintfChris Rankin
snprintf()'s size parameter includes space for the terminating '\0' character. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] DVB: increment minor version after addition of SYS_TURBOAndreas Oberritter
Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] DVB: dvb_frontend: remove static assignments from ↵Andreas Oberritter
dtv_property_cache_sync() dtv_property_cache_init(). dtv_property_process_get(). overwritten with invalid values, leading to partially incorrect results when calling FE_GET_PROPERTY. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] drivers/media: do not use EXTRA_CFLAGSArnaud Lacombe
Usage of these flags has been deprecated for nearly 4 years by: commit f77bf01425b11947eeb3b5b54685212c302741b8 Author: Sam Ravnborg <sam@neptun.(none)> Date: Mon Oct 15 22:25:06 2007 +0200 kbuild: introduce ccflags-y, asflags-y and ldflags-y Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command line use. By default, gmake(1) do not override command line setting, so this is likely to result in build failure or unexpected behavior. Replace their usage by Kbuild's `{as,cc,ld}flags-y'. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: linux-media@vger.kernel.org Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] Add missing OK key to PCTV IR keymapChris Rankin
Hi, The following patch adds the IR code for the missing "OK" key to the Pinnacle PCTV HD map. This map is now used by the PCTV 290e DVB-T2 device, whose remote control has 26 buttons. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] drivers/media/video/zr364xx.c: add missing cleanup codeJulia Lawall
It seems just as necessary to free cam->vdev and cam in this error case as in the next one. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] MAINTAINERS: add entries for s5p-mfc and s5p-tv driversMarek Szyprowski
Both driver has been merged to v3.1-rc1, so add its authors as maintainers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] ddbridge: fix ddb_ioctl()Dan Carpenter
There were a several problems in this function: 1) Potential integer overflow in the comparison: if (fio.write_len + fio.read_len > 1028) { 2) If the user gave bogus values for write_len and read_len then returning -EINVAL is more appropriate than returning -ENOMEM. 3) wbuf was set to the address of an array and could never be NULL so I removed the pointless NULL check. 4) The call to vfree(wbuf) was improper. That array is part of a larger struct and isn't allocated by itself. 5) flashio() can't actually fail, but we may as well add error handling in case this changes later. 6) In the default case where an ioctl is not implemented then returning -ENOTTY is more appropriate than returning -EFAULT. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>