diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_ir.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ir.c b/linux/drivers/media/dvb/ttpci/av7110_ir.c index 10df56b54..e5fa5b08a 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_ir.c +++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c @@ -12,6 +12,7 @@ /* enable ir debugging by or'ing av7110_debug with 16 */ +static int ir_initialized; static struct input_dev input_dev; static u32 ir_config; @@ -160,6 +161,9 @@ static int av7110_ir_write_proc(struct file *file, const char __user *buffer, int __init av7110_ir_init(void) { + if (ir_initialized) + return 0; + static struct proc_dir_entry *e; init_timer(&keyup_timer); @@ -187,16 +191,20 @@ int __init av7110_ir_init(void) e->size = 4 + 256 * sizeof(u16); } + ir_initialized = 1; return 0; } void __exit av7110_ir_exit(void) { + if (ir_initialized == 0) + return; del_timer_sync(&keyup_timer); remove_proc_entry("av7110_ir", NULL); av7110_unregister_irc_handler(av7110_emit_key); input_unregister_device(&input_dev); + ir_initialized = 0; } //MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>"); |