diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-12 19:18:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:47:05 -0400 |
commit | 727e625cc2c114e449a78f851b0c12edac897a83 (patch) | |
tree | ec7b14d68fb1b79d636d50756082e61360610063 /drivers/media/video | |
parent | 9c89a181a09eaafca5fc638c3b7ce1620227f60a (diff) |
V4L/DVB: ir-core: export driver name used by IR via uevent
Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-input.c | 5 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 8 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 4 |
7 files changed, 23 insertions, 10 deletions
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index aa153a986ade..d17a9b7911e5 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c | |||
@@ -49,6 +49,8 @@ module_param(ir_rc5_key_timeout, int, 0644); | |||
49 | 49 | ||
50 | #define DEVNAME "bttv-input" | 50 | #define DEVNAME "bttv-input" |
51 | 51 | ||
52 | #define MODULE_NAME "bttv" | ||
53 | |||
52 | /* ---------------------------------------------------------------------- */ | 54 | /* ---------------------------------------------------------------------- */ |
53 | 55 | ||
54 | static void ir_handle_key(struct bttv *btv) | 56 | static void ir_handle_key(struct bttv *btv) |
@@ -390,7 +392,7 @@ int bttv_input_init(struct bttv *btv) | |||
390 | bttv_ir_start(btv, ir); | 392 | bttv_ir_start(btv, ir); |
391 | 393 | ||
392 | /* all done */ | 394 | /* all done */ |
393 | err = ir_input_register(btv->remote->dev, ir_codes, NULL); | 395 | err = ir_input_register(btv->remote->dev, ir_codes, NULL, MODULE_NAME); |
394 | if (err) | 396 | if (err) |
395 | goto err_out_stop; | 397 | goto err_out_stop; |
396 | 398 | ||
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c index b473cd8367f5..a0e8bb88d67e 100644 --- a/drivers/media/video/cx231xx/cx231xx-input.c +++ b/drivers/media/video/cx231xx/cx231xx-input.c | |||
@@ -35,6 +35,8 @@ static unsigned int ir_debug; | |||
35 | module_param(ir_debug, int, 0644); | 35 | module_param(ir_debug, int, 0644); |
36 | MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); | 36 | MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); |
37 | 37 | ||
38 | #define MODULE_NAME "cx231xx" | ||
39 | |||
38 | #define i2cdprintk(fmt, arg...) \ | 40 | #define i2cdprintk(fmt, arg...) \ |
39 | if (ir_debug) { \ | 41 | if (ir_debug) { \ |
40 | printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \ | 42 | printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \ |
@@ -217,7 +219,8 @@ int cx231xx_ir_init(struct cx231xx *dev) | |||
217 | cx231xx_ir_start(ir); | 219 | cx231xx_ir_start(ir); |
218 | 220 | ||
219 | /* all done */ | 221 | /* all done */ |
220 | err = ir_input_register(ir->input, dev->board.ir_codes, NULL); | 222 | err = ir_input_register(ir->input, dev->board.ir_codes, |
223 | NULL, MODULE_NAME); | ||
221 | if (err) | 224 | if (err) |
222 | goto err_out_stop; | 225 | goto err_out_stop; |
223 | 226 | ||
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index 8e9d990dbe93..ef1db2d9668a 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | #define RC5_EXTENDED_COMMAND_OFFSET 64 | 52 | #define RC5_EXTENDED_COMMAND_OFFSET 64 |
53 | 53 | ||
54 | #define MODULE_NAME "cx23885" | ||
55 | |||
54 | static inline unsigned int rc5_command(u32 rc5_baseband) | 56 | static inline unsigned int rc5_command(u32 rc5_baseband) |
55 | { | 57 | { |
56 | return RC5_INSTR(rc5_baseband) + | 58 | return RC5_INSTR(rc5_baseband) + |
@@ -398,7 +400,7 @@ int cx23885_input_init(struct cx23885_dev *dev) | |||
398 | dev->ir_input = ir; | 400 | dev->ir_input = ir; |
399 | cx23885_input_ir_start(dev); | 401 | cx23885_input_ir_start(dev); |
400 | 402 | ||
401 | ret = ir_input_register(ir->dev, ir_codes, NULL); | 403 | ret = ir_input_register(ir->dev, ir_codes, NULL, MODULE_NAME); |
402 | if (ret) | 404 | if (ret) |
403 | goto err_out_stop; | 405 | goto err_out_stop; |
404 | 406 | ||
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 6b6abf062c21..8b52546c6e1d 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include "cx88.h" | 32 | #include "cx88.h" |
33 | #include <media/ir-common.h> | 33 | #include <media/ir-common.h> |
34 | 34 | ||
35 | #define MODULE_NAME "cx88xx" | ||
36 | |||
35 | /* ---------------------------------------------------------------------- */ | 37 | /* ---------------------------------------------------------------------- */ |
36 | 38 | ||
37 | struct cx88_IR { | 39 | struct cx88_IR { |
@@ -384,7 +386,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
384 | cx88_ir_start(core, ir); | 386 | cx88_ir_start(core, ir); |
385 | 387 | ||
386 | /* all done */ | 388 | /* all done */ |
387 | err = ir_input_register(ir->input, ir_codes, NULL); | 389 | err = ir_input_register(ir->input, ir_codes, NULL, MODULE_NAME); |
388 | if (err) | 390 | if (err) |
389 | goto err_out_stop; | 391 | goto err_out_stop; |
390 | 392 | ||
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 20a0001e8885..32f376654c0c 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -39,6 +39,8 @@ static unsigned int ir_debug; | |||
39 | module_param(ir_debug, int, 0644); | 39 | module_param(ir_debug, int, 0644); |
40 | MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); | 40 | MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); |
41 | 41 | ||
42 | #define MODULE_NAME "em28xx" | ||
43 | |||
42 | #define i2cdprintk(fmt, arg...) \ | 44 | #define i2cdprintk(fmt, arg...) \ |
43 | if (ir_debug) { \ | 45 | if (ir_debug) { \ |
44 | printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \ | 46 | printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \ |
@@ -474,7 +476,7 @@ int em28xx_ir_init(struct em28xx *dev) | |||
474 | 476 | ||
475 | /* all done */ | 477 | /* all done */ |
476 | err = ir_input_register(ir->input, dev->board.ir_codes, | 478 | err = ir_input_register(ir->input, dev->board.ir_codes, |
477 | &ir->props); | 479 | &ir->props, MODULE_NAME); |
478 | if (err) | 480 | if (err) |
479 | goto err_out_stop; | 481 | goto err_out_stop; |
480 | 482 | ||
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index da18d698e7f2..6af69d5c8499 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -61,9 +61,9 @@ module_param(hauppauge, int, 0644); /* Choose Hauppauge remote */ | |||
61 | MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)"); | 61 | MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)"); |
62 | 62 | ||
63 | 63 | ||
64 | #define DEVNAME "ir-kbd-i2c" | 64 | #define MODULE_NAME "ir-kbd-i2c" |
65 | #define dprintk(level, fmt, arg...) if (debug >= level) \ | 65 | #define dprintk(level, fmt, arg...) if (debug >= level) \ |
66 | printk(KERN_DEBUG DEVNAME ": " fmt , ## arg) | 66 | printk(KERN_DEBUG MODULE_NAME ": " fmt , ## arg) |
67 | 67 | ||
68 | /* ----------------------------------------------------------------------- */ | 68 | /* ----------------------------------------------------------------------- */ |
69 | 69 | ||
@@ -447,11 +447,11 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
447 | input_dev->name = ir->name; | 447 | input_dev->name = ir->name; |
448 | input_dev->phys = ir->phys; | 448 | input_dev->phys = ir->phys; |
449 | 449 | ||
450 | err = ir_input_register(ir->input, ir->ir_codes, NULL); | 450 | err = ir_input_register(ir->input, ir->ir_codes, NULL, MODULE_NAME); |
451 | if (err) | 451 | if (err) |
452 | goto err_out_free; | 452 | goto err_out_free; |
453 | 453 | ||
454 | printk(DEVNAME ": %s detected at %s [%s]\n", | 454 | printk(MODULE_NAME ": %s detected at %s [%s]\n", |
455 | ir->input->name, ir->input->phys, adap->name); | 455 | ir->input->name, ir->input->phys, adap->name); |
456 | 456 | ||
457 | /* start polling via eventd */ | 457 | /* start polling via eventd */ |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index a2b16693ee9a..c1fe7c9369b2 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include "saa7134-reg.h" | 28 | #include "saa7134-reg.h" |
29 | #include "saa7134.h" | 29 | #include "saa7134.h" |
30 | 30 | ||
31 | #define MODULE_NAME "saa7134" | ||
32 | |||
31 | static unsigned int disable_ir; | 33 | static unsigned int disable_ir; |
32 | module_param(disable_ir, int, 0444); | 34 | module_param(disable_ir, int, 0444); |
33 | MODULE_PARM_DESC(disable_ir,"disable infrared remote support"); | 35 | MODULE_PARM_DESC(disable_ir,"disable infrared remote support"); |
@@ -730,7 +732,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
730 | dev->remote = ir; | 732 | dev->remote = ir; |
731 | saa7134_ir_start(dev, ir); | 733 | saa7134_ir_start(dev, ir); |
732 | 734 | ||
733 | err = ir_input_register(ir->dev, ir_codes, NULL); | 735 | err = ir_input_register(ir->dev, ir_codes, NULL, MODULE_NAME); |
734 | if (err) | 736 | if (err) |
735 | goto err_out_stop; | 737 | goto err_out_stop; |
736 | 738 | ||