aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-09 22:50:49 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-09 22:50:49 -0500
commit3e7468313758913c5e4d372f35b271b96bad1298 (patch)
treeeb612d252a9e2349a1173451cd779beebd18a33e /drivers/media/video/cx231xx
parent6825fbc4cb219f2c98bb7d157915d797cf5cb823 (diff)
parente97f4677961f68e29bd906022ebf60a6df7f530a (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (345 commits) V4L/DVB (13542): ir-keytable: Allow dynamic table change V4L/DVB (13541): atbm8830: replace 64-bit division and floating point usage V4L/DVB (13540): ir-common: Cleanup get key evdev code V4L/DVB (13539): ir-common: add __func__ for debug messages V4L/DVB (13538): ir-common: Use a dynamic keycode table V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code V4L/DVB (13534): ir-common: Remove some unused fields/structs V4L/DVB (13533): ir: use dynamic tables, instead of static ones V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it V4L/DVB (13458): go7007: subdev conversion V4L/DVB (13457): s2250: subdev conversion V4L/DVB (13456): s2250: Change module structure V4L/DVB (13528): em28xx: add support for em2800 VC211A card em28xx: don't reduce scale to half size for em2800 em28xx: don't load audio modules when AC97 is mis-detected em28xx: em2800 chips support max width of 640 V4L/DVB (13523): dvb-bt8xx: fix compile warning ... Fix up trivial conflicts due to spelling fixes from the trivial tree in Documentation/video4linux/gspca.txt drivers/media/video/cx18/cx18-mailbox.h
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-input.c11
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c
index 48f22fa38e6c..cd135f01b9c1 100644
--- a/drivers/media/video/cx231xx/cx231xx-input.c
+++ b/drivers/media/video/cx231xx/cx231xx-input.c
@@ -126,8 +126,7 @@ static void cx231xx_ir_handle_key(struct cx231xx_IR *ir)
126 126
127 if (do_sendkey) { 127 if (do_sendkey) {
128 dprintk("sending keypress\n"); 128 dprintk("sending keypress\n");
129 ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0], 129 ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0]);
130 poll_result.rc_data[0]);
131 ir_input_nokey(ir->input, &ir->ir); 130 ir_input_nokey(ir->input, &ir->ir);
132 } 131 }
133 132
@@ -198,7 +197,11 @@ int cx231xx_ir_init(struct cx231xx *dev)
198 usb_make_path(dev->udev, ir->phys, sizeof(ir->phys)); 197 usb_make_path(dev->udev, ir->phys, sizeof(ir->phys));
199 strlcat(ir->phys, "/input0", sizeof(ir->phys)); 198 strlcat(ir->phys, "/input0", sizeof(ir->phys));
200 199
201 ir_input_init(input_dev, &ir->ir, IR_TYPE_OTHER, dev->board.ir_codes); 200 err = ir_input_init(input_dev, &ir->ir, IR_TYPE_OTHER,
201 dev->board.ir_codes);
202 if (err < 0)
203 goto err_out_free;
204
202 input_dev->name = ir->name; 205 input_dev->name = ir->name;
203 input_dev->phys = ir->phys; 206 input_dev->phys = ir->phys;
204 input_dev->id.bustype = BUS_USB; 207 input_dev->id.bustype = BUS_USB;
@@ -223,6 +226,7 @@ err_out_stop:
223 cx231xx_ir_stop(ir); 226 cx231xx_ir_stop(ir);
224 dev->ir = NULL; 227 dev->ir = NULL;
225err_out_free: 228err_out_free:
229 ir_input_free(input_dev);
226 input_free_device(input_dev); 230 input_free_device(input_dev);
227 kfree(ir); 231 kfree(ir);
228 return err; 232 return err;
@@ -237,6 +241,7 @@ int cx231xx_ir_fini(struct cx231xx *dev)
237 return 0; 241 return 0;
238 242
239 cx231xx_ir_stop(ir); 243 cx231xx_ir_stop(ir);
244 ir_input_free(ir->input);
240 input_unregister_device(ir->input); 245 input_unregister_device(ir->input);
241 kfree(ir); 246 kfree(ir);
242 247
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index 36503725d973..d095aa0d6d19 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -2106,7 +2106,7 @@ static int cx231xx_v4l2_close(struct file *filp)
2106 } 2106 }
2107 2107
2108 /* Save some power by putting tuner to sleep */ 2108 /* Save some power by putting tuner to sleep */
2109 call_all(dev, tuner, s_standby); 2109 call_all(dev, core, s_power, 0);
2110 2110
2111 /* do this before setting alternate! */ 2111 /* do this before setting alternate! */
2112 cx231xx_uninit_isoc(dev); 2112 cx231xx_uninit_isoc(dev);