aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dm1105/dm1105.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-20 12:37:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-20 12:37:45 -0400
commitfb091be08d1acf184e8801dfdcace6e0cb19b1fe (patch)
treecbd0c4200fd8628d592167589ca790e36fc4ae26 /drivers/media/dvb/dm1105/dm1105.c
parentbd7fc2f2d807fdb254f7efc542f8eec3f23e289e (diff)
parente8d0416796d43a950ec7b65629e53419b2e22453 (diff)
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (534 commits) V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers V4L/DVB: vivi and mem2mem_testdev need slab.h to build V4L/DVB: tm6000: bugfix image position V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET V4L/DVB: tm6000: README - add vbi V4L/DVB: Fix unlock logic at medusa_video_init V4L/DVB: fix dvb frontend lockup V4L/DVB: s2255drv: remove dead code V4L/DVB: s2255drv: return if vdev not found V4L/DVB: ov511: cleanup: remove unneeded null check V4L/DVB: media/mem2mem: dereferencing free memory V4L/DVB: media/IR: Add missing include file to rc-map.c V4L/DVB: dvb/stv6110x: cleanup error handling V4L/DVB: ngene: Add lgdt3303 and mt2131 deps to Kconfig V4L/DVB: ngene: start separating out DVB functions into separate file V4L/DVB: ngene: split out card specific code into a separate file V4L/DVB: ngene: split out i2c code into a separate file V4L/DVB: ngene: add initial support for digital side of Avermedia m780 V4L/DVB: ngene: properly support boards where channel 0 isn't a TS input V4L-DVB: ngene: make sure that tuner headers are included ...
Diffstat (limited to 'drivers/media/dvb/dm1105/dm1105.c')
-rw-r--r--drivers/media/dvb/dm1105/dm1105.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index b6d46961a99e..b762e561a6d5 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -28,7 +28,7 @@
28#include <linux/dma-mapping.h> 28#include <linux/dma-mapping.h>
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <media/ir-common.h> 31#include <media/ir-core.h>
32 32
33#include "demux.h" 33#include "demux.h"
34#include "dmxdev.h" 34#include "dmxdev.h"
@@ -46,6 +46,8 @@
46#include "z0194a.h" 46#include "z0194a.h"
47#include "ds3000.h" 47#include "ds3000.h"
48 48
49#define MODULE_NAME "dm1105"
50
49#define UNSET (-1U) 51#define UNSET (-1U)
50 52
51#define DM1105_BOARD_NOAUTO UNSET 53#define DM1105_BOARD_NOAUTO UNSET
@@ -265,7 +267,6 @@ static void dm1105_card_list(struct pci_dev *pci)
265/* infrared remote control */ 267/* infrared remote control */
266struct infrared { 268struct infrared {
267 struct input_dev *input_dev; 269 struct input_dev *input_dev;
268 struct ir_input_state ir;
269 char input_phys[32]; 270 char input_phys[32];
270 struct work_struct work; 271 struct work_struct work;
271 u32 ir_command; 272 u32 ir_command;
@@ -531,8 +532,7 @@ static void dm1105_emit_key(struct work_struct *work)
531 532
532 data = (ircom >> 8) & 0x7f; 533 data = (ircom >> 8) & 0x7f;
533 534
534 ir_input_keydown(ir->input_dev, &ir->ir, data); 535 ir_keydown(ir->input_dev, data, 0);
535 ir_input_nokey(ir->input_dev, &ir->ir);
536} 536}
537 537
538/* work handler */ 538/* work handler */
@@ -594,8 +594,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id)
594int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) 594int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
595{ 595{
596 struct input_dev *input_dev; 596 struct input_dev *input_dev;
597 struct ir_scancode_table *ir_codes = &ir_codes_dm1105_nec_table; 597 char *ir_codes = NULL;
598 u64 ir_type = IR_TYPE_OTHER;
599 int err = -ENOMEM; 598 int err = -ENOMEM;
600 599
601 input_dev = input_allocate_device(); 600 input_dev = input_allocate_device();
@@ -606,12 +605,6 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
606 snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), 605 snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys),
607 "pci-%s/ir0", pci_name(dm1105->pdev)); 606 "pci-%s/ir0", pci_name(dm1105->pdev));
608 607
609 err = ir_input_init(input_dev, &dm1105->ir.ir, ir_type);
610 if (err < 0) {
611 input_free_device(input_dev);
612 return err;
613 }
614
615 input_dev->name = "DVB on-card IR receiver"; 608 input_dev->name = "DVB on-card IR receiver";
616 input_dev->phys = dm1105->ir.input_phys; 609 input_dev->phys = dm1105->ir.input_phys;
617 input_dev->id.bustype = BUS_PCI; 610 input_dev->id.bustype = BUS_PCI;
@@ -628,9 +621,13 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
628 621
629 INIT_WORK(&dm1105->ir.work, dm1105_emit_key); 622 INIT_WORK(&dm1105->ir.work, dm1105_emit_key);
630 623
631 err = ir_input_register(input_dev, ir_codes, NULL); 624 err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
625 if (err < 0) {
626 input_free_device(input_dev);
627 return err;
628 }
632 629
633 return err; 630 return 0;
634} 631}
635 632
636void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) 633void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105)