aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-01-19[media] v4l2-dev: don't memset video_device.devHans Verkuil1-5/+4
Zeroing video_device.dev causes a memory leak if video_set_drvdata was called before video_register_device was called. video_set_drvdata calls dev_set_drvdata which allocates video_device.dev.p. memsetting this will prevent freeing of that memory. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] zoran: use video_device_alloc instead of kmallocHans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] w9966: zero device state after a detachHans Verkuil1-0/+1
After a detach zero the whole device state to ensure a clean slate on the next attach. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l: Fix a use-before-set in the control frameworkLaurent Pinchart1-1/+1
v4l2_queryctrl sets the step value based on the control type. That would be fine if it used the control type stored in the V4L2 kernel control object, not the one stored in the userspace ioctl structure that has just been memset to 0. Fix this. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l: Include linux/videodev2.h in media/v4l2-ctrls.hLaurent Pinchart1-0/+1
The later makes extensive use of structures defined in the former. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] DocBook/v4l: update V4L2 revision and update copyright yearsHans Verkuil3-4/+5
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] DocBook/v4l: fix validation error in dev-rds.xmlHans Verkuil1-2/+4
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l2-ctrls: queryctrl shouldn't attempt to replace ↵Hans Verkuil1-1/+4
V4L2_CID_PRIVATE_BASE IDs When queryctrl is called with a V4L2_CID_PRIVATE_BASE control ID, then currently it is replaced by the real internal ID. This is not according to the spec so keep the V4L2_CID_PRIVATE_BASE ID in this case. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l2-ctrls: fix missing 'read-only' checkHans Verkuil1-0/+3
VIDIOC_S_CTRL did not check against read-only controls. Even worse, for controls of type CTRL_CLASS it would cause a kernel oops since those controls do not have a s_ctrl op. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] pvrusb2: Provide more information about IR units to lirc_zilog and ↵Andy Walls2-19/+45
ir-kbd-i2c When registering an IR Rx device with the I2C subsystem, provide more detailed information about the IR device and default remote configuration for the IR driver modules. Also explicitly register any IR Tx device with the I2C subsystem. Signed-off-by: Andy Walls <[email protected]> Acked-by: Mike Isely <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] ir-kbd-i2c: Add back defaults setting for Zilog Z8's at addr 0x71Andy Walls1-0/+6
This reverts a portion of commit 44243fc2ef99948bc9b046901880885616dd5e89 A commit for which I errantly recommended that defaults for I2C address 0x71 not be set by ir-kbd-i2c.c The pvrusb2 and bttv drivers currently rely on ir-kbd-i2c setting defaults for that address. Until I can get those bridge drivers fixed to properly send IR_i2c_init_data for boards with Zilog Z8 chips, just add back the default settings for I2C address 0x71. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Update TODO.lirc_zilogAndy Walls1-6/+30
Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Add Andy Walls to copyright notice and authors listAndy Walls1-1/+5
Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Remove useless struct i2c_driver.command functionAndy Walls1-8/+0
The ir_command() function is a do-nothing stub; remove it. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Remove unneeded tests for existence of the IR Tx functionAndy Walls1-16/+5
The driver is now structured so that it must handle an IR Tx unit for a Z8 IR chip, or it refuses to handle that Z8 IR chip. This allows us to assume that ir->tx != NULL in a few places in the driver, and also allows us to always report Tx is available to userspace. Get rid of unneeded tests for ir->tx == NULL and always report that Tx is available. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Update IR Rx polling kthread start/stop and some printksAndy Walls1-64/+49
The IR Rx polling thread was originally a kernel_thread long ago, and had only been minimally converted to a kthread. This patch finishes that conversion by - cleaning up all the unneeded completions - destroying the kthread properly by calling kthread_stop() - changing lirc_thread() to test kthread_should_stop() just before every point where it may sleep - reorganizing the lirc_thread() function so it uses fewer lines - modifying the name of the kthread from "lirc_zilog" to "zilog-rx-i2c-N", so ps will show which kthread polls which Zilog Z8 IR unit. Also some minor tweaks were made to logging emitted by the ir_probe() function. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Extensive rework of ir_probe()/ir_remove()Andy Walls1-132/+212
This patch is an extensive rework of the ir_probe() and ir_remove() functions. It removes all the double binding and allocation problems on module load. It removes almost all the memory leaks on module exit and on device instantiation failure. Proper destruction of the Rx polling kthread still needs investigation and more work, but it is no worse than it already was. This rework also had side effects that include: - encapsulation of the ir_devices[] array - serialization of access to the ir_devices[] array - semantic change of the module parameter "disable_rx" to "tx_only" If tx_only is true, the module does not claim the i2c_client for the IR Rx function, and only claims and handles the i2c_client for the IR Tx function. This is a first step in providing the option of letting ir-kbd-i2c.c handle IR Rx function, while lirc_zilog handles the IR Tx function. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Don't make private copies of i2c clientsAndy Walls1-59/+28
Don't make private copies of the i2c clients provided by the I2C subsystem, don't change the client address field, and don't probe the client addresses - the bridge driver already did that. This moves us to the proper I2C and binding model. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Split struct IR into structs IR, IR_tx, and IR_rxAndy Walls1-127/+171
This change is a mostly mechanical break of the main struct IR data structure into common, Rx, and Tx structures. There were some small logical changes required as well, such as eliminating "is_hdpvr", to accomplish this. This change is an intiial step in reworking lirc_zilog to decouple the Rx and Tx handling as much as possible to fit with the new I2C binding model. This change actually makes lirc_zilog a little more broken than it already was - memory deallocation in particular got worse. However, this change makes the remaining problems easier to see and address. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Remove disable_tx module parameterAndy Walls1-10/+4
The only reason to use the lirc_zilog module is for IR Tx, so remove the possibility of disabling IR Tx. If the user needs only IR Rx, then the ir-kbd-i2c module works just fine, and doesn't require a "firmware" image. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] lirc_zilog: Reword debug message in ir_probe()Andy Walls1-3/+2
Jean Delvare <[email protected]> suggested this better format for debug output in ir_probe(). Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] firedtv: fix remote control with newer Xorg evdevStefan Richter1-3/+6
After a recent update of xf86-input-evdev and xorg-server, I noticed that X11 applications did not receive keypresses from the FireDTV infrared remote control anymore. Instead, the Xorg log featured lots of "FireDTV remote control: dropping event due to full queue!" exclamations. The Linux console did not have an issue with the FireDTV's RC though. The fix is to insert EV_SYN events after the key-down/-up events. Signed-off-by: Stefan Richter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] tm6000: rework init codeDmitri Belimov1-10/+36
Rework device init part. Move common code part to a function. Usefull for register multiple devices like video, radio, vbi etc. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] radio-aimslab.c needs #include <linux/delay.h>Geert Uytterhoeven1-0/+1
Commit e3c92215198cb6aa00ad38db2780faa6b72e0a3f ("[media] radio-aimslab.c: Fix gcc 4.5+ bug") removed the include, but introduced new callers of msleep(): | drivers/media/radio/radio-aimslab.c: In function ‘rt_decvol’: | drivers/media/radio/radio-aimslab.c:76: error: implicit declaration of function ‘msleep’ Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] ir-raw: fix sparse non-ANSI function warningRandy Dunlap1-1/+1
Fix sparse warning for non-ANSI function declaration: drivers/media/rc/ir-raw.c:247:30: warning: non-ANSI function declaration of function 'ir_raw_get_allowed_protocols' Signed-off-by: Randy Dunlap <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] adv7175: support s_powerChristian Gmeiner1-0/+11
This patch adds s_power support to adv7175 driver. Power-down is done by power-down all four DACs. Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] [v3,media] av7110: check for negative array offsetDan Carpenter1-1/+1
info->num comes from the user. It's type int. If the user passes in a negative value that would cause memory corruption. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] rc/imon: default to key mode instead of mouse modeJarod Wilson1-14/+4
My initial thinking was that we should default to mouse mode, so people could use the mouse function to click on something on a login screen, but a lot of systems where a remote is useful automatically log in a user and launch a media center application, some of which hide the mouse, which can be confusing to users if they punch buttons on the remote and don't see any feedback. Plus, first and foremost, its a remote, so lets default to being a remote, and only toggle into mouse mode when the user explicitly asks for it. As a nice side-effect, this actually simplifies some of the code a fair bit... Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] rc: fix up and genericize some time unit conversionsJarod Wilson4-14/+14
The ene_ir driver was using a private define of MS_TO_NS, which is meant to be microseconds to nanoseconds. The mceusb driver copied it, intending to use is a milliseconds to microseconds. Lets move the defines to a common location, expand and standardize them a touch, so that we now have: MS_TO_NS - milliseconds to nanoseconds MS_TO_US - milliseconds to microseconds US_TO_NS - microseconds to nanoseconds Reported-by: David Härdeman <[email protected]> CC: Maxim Levitsky <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] rc/imon: need to submit urb before ffdc type checkJarod Wilson1-14/+14
Otherwise, we have a null receive buffer, and the logic all falls down, goes boom, all ffdc devs wind up as imon IR w/VFD. Oops. Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] rc/ene_ir: fix oops on module loadKyle McMartin1-1/+6
dev->rdev is accessed in ene_setup_hw_settings, so it needs to be wired up before then. [Jarod Wilson]: Also fix a possible improper resource freeing bug while we're looking at possible probe issues here. Signed-off-by: Kyle McMartin <[email protected]> CC: Maxim Levitsky <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] rc/imon: fix ffdc device detection oopsJarod Wilson1-6/+8
There's a nasty bug that slipped in when the rc device interface was altered, only affecting the older 0xffdc imon devices. We were trying to access ictx->rdev->allowed_protos before ictx->rdev had been set. There's also an issue with call ordering that meant the correct keymap wasn't getting loaded for MCE IR type 0xffdc devices. Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] DVB: cx231xx drivers does not use dummy frontend anymoreThadeu Lima de Souza Cascardo1-3/+2
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] V4L2: WL1273 FM Radio: Replace ioctl with unlocked_ioctlMatti Aaltonen1-1/+1
Use unlocked_ioctl in v4l2_file_operations. The locking is already in place. Signed-off-by: Matti J. Aaltonen <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l/cx18: update workqueue usageTejun Heo3-27/+3
With cmwq, there's no reason to use separate out_work_queue. Drop it and use system_wq instead. The in_work_queue needs to be ordered so can't use one of the system wqs; however, as it isn't used to reclaim memory, allocate the workqueue with alloc_ordered_workqueue() without WQ_MEM_RECLAIM. Signed-off-by: Tejun Heo <[email protected]> Reviewed-by: Andy Walls <[email protected]> Acked-by: Andy Walls <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] media, tlg2300: Fix memory leak in alloc_bulk_urbs_generic()Jesper Juhl1-6/+7
Hi, While reading drivers/media/video/tlg2300/pd-video.c::alloc_bulk_urbs_generic() I noticed that - We don't free the memory allocated to 'urb' if the call to usb_alloc_coherent() fails. - If the 'num' argument to the function is ever <= 0 we'll return an uninitialized variable 'i' to the caller. The following patch addresses both of the above by a) calling usb_free_urb() when usb_alloc_coherent() fails and by explicitly initializing 'i' to zero. I also moved the variables 'mem' and 'urb' inside the for loop. This does not actually make any difference, it just seemed more correct to me to let variables exist only in the innermost scope they are used. Signed-off-by: Jesper Juhl <[email protected]> Acked-by: Huang Shijie <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] frontends/ix2505v: Remember to free allocated memory in failure pathJesper Juhl1-1/+1
We may leak the storage allocated to 'state' in drivers/media/dvb/frontends/ix2505v.c::ix2505v_attach() on error, as it is too early to be able to call ix2505v_release(). This patch makes sure we free the allocated memory in the failure case. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca - sonixj: Add LED (illuminator) control to the webcam 0c45:614aJean-François Moine1-9/+17
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca - sonixj: Infrared bug fix and enhancementJean-François Moine1-42/+38
The infrared was set by sensor write instead of bridge GPIO. It is now settable by the standard control ILLUMINATOR_1. A module parameter permits to set the right GPIO bit according to the StarCam model. Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca - ov534: Propagate errors to higher levelJean-François Moine1-5/+16
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca - ov534: Clearer debug messagesJean-François Moine1-3/+3
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca - ov519: Cleanup source and add a commentJean-François Moine1-4/+2
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca: Remove useless instructionsJean-François Moine1-2/+2
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca: Remove __devinit, __devinitconst and __devinitdataJean-François Moine39-44/+44
__devinit* must not be used in USB drivers. Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] gspca: Version changeJean-François Moine1-1/+1
Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l2-ctrls: v4l2_ctrl_handler_setup must set is_new to 1Hans Verkuil3-12/+30
Renamed has_new to is_new. Drivers can use the is_new field to determine if a new value was specified for a control. The v4l2_ctrl_handler_setup() must always set this to 1 since the setup has to force a full update of all controls. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l2-subdev: add (un)register internal opsHans Verkuil2-2/+29
Some subdevs need to call into the board code after they are registered and have a valid struct v4l2_device pointer. The s_config op was abused for this, but now that it is removed we need a cleaner way of solving this. So this patch adds a struct with internal ops that the v4l2 core can call. Currently only two ops exist: register and unregister. Subdevs can implement these to call the board code and pass it the v4l2_device pointer, which the board code can then use to get access to the struct that embeds the v4l2_device. It is expected that in the future open and close ops will also be added. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg()Hans Verkuil12-171/+118
The core.s_config op was meant for legacy drivers that needed to work with old pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was incorrectly called from several drivers. Replace those occurences with proper i2c_board_info structs and call v4l2_i2c_new_subdev_board. After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove that function as well. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] saa7134: Kworld SBTVD: make both analog and digital to workMauro Carvalho Chehab3-17/+16
There are some weird bugs at tda8290/tda18271 initialization, as it insits do do analog initialization during DVB frontend attach: DVB: registering new adapter (saa7133[0]) DVB: registering adapter 0 frontend 0 (Fujitsu mb86A20s)... mb86a20s: mb86a20s_initfe tda18271_write_regs: [2-0060|M] ERROR: idx = 0x5, len = 1, i2c_transfer returned: -5 tda18271_init: [2-0060|M] error -5 on line 830 tda18271_tune: [2-0060|M] error -5 on line 908 tda18271_write_regs tda18271_write_regs: [2-0060|M] ERROR: idx = 0x5, len = 1, i2c_transfer returned: -5 tda18271c2_rf_tracking_filters_correction: [2-0060|M] error -5 on line 265 tda18271_write_regs tda18271_write_regs: [2-0060|M] ERROR: idx = 0x25, len = 1, i2c_transfer returned: -5 tda18271_channel_configuration: [2-0060|M] error -5 on line 119 tda18271_set_analog_params: [2-0060|M] error -5 on line 1045 tda18271_set_analog_params: [2-0060|M] error -5 on line 1045 tda829x 2-004b: tda8295 not locked, no signal? tda829x 2-004b: tda8295_i2c_bridge: disable i2c gate tda829x 2-004b: tda8295 not locked, no signal? tda829x 2-004b: tda8295_i2c_bridge: disable i2c gate mb86a20s_i2c_writereg: writereg error (rc == -5, reg == 0x29, data == 0x33) mb86a20s: Init failed. Will try again later The problem is that mb86a20s is only visible if the analog part is disabled. However, due to a trick at mb86a20s, it will later initialize properly: mb86a20s: mb86a20s_initfe: Initialization succeded. This is hacky and ugly. However, I coldn't find any easy way to fix it. A proper fix would be to have a resource locking schema, used by both V4L and DVB parts that would block access to analog registers while digital registers are in use, but this will probably put tda829x into a dead lock. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-01-19[media] saa7134: Fix digital mode on Kworld SBTVDMauro Carvalho Chehab2-2/+41
This patch fixes digital mode on Kworld SBTVD. Unfortunately, it disables analog mode. Signed-off-by: Mauro Carvalho Chehab <[email protected]>