Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208160
b: refs/heads/master
c: b378f43
h: refs/heads/master
v: v3
  • Loading branch information
Maxim Levitsky authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 4167b06 commit 6f2cbf1
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86ff071cad3e7e4c7469b3941bfced6fe9b04b5f
refs/heads/master: b378f43fe9466e7712a8b16be64795ffca3a937e
3 changes: 2 additions & 1 deletion trunk/drivers/media/IR/ir-core-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
void ir_raw_init(void);


int ir_rcmap_init(void);
void ir_rcmap_cleanup(void);
/*
* Decoder initialization code
*
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/IR/ir-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,15 @@ static int __init ir_core_init(void)

/* Initialize/load the decoders/keymap code that will be used */
ir_raw_init();
ir_rcmap_init();

return 0;
}

static void __exit ir_core_exit(void)
{
class_unregister(&ir_input_class);
ir_rcmap_cleanup();
}

module_init(ir_core_init);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/IR/keymaps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-dm1105-nec.o \
rc-dntv-live-dvb-t.o \
rc-dntv-live-dvbt-pro.o \
rc-empty.o \
rc-em-terratec.o \
rc-encore-enltv2.o \
rc-encore-enltv.o \
Expand Down
44 changes: 0 additions & 44 deletions trunk/drivers/media/IR/keymaps/rc-empty.c

This file was deleted.

23 changes: 23 additions & 0 deletions trunk/drivers/media/IR/rc-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,26 @@ void ir_unregister_map(struct rc_keymap *map)
}
EXPORT_SYMBOL_GPL(ir_unregister_map);


static struct ir_scancode empty[] = {
{ 0x2a, KEY_COFFEE },
};

static struct rc_keymap empty_map = {
.map = {
.scan = empty,
.size = ARRAY_SIZE(empty),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_EMPTY,
}
};

int ir_rcmap_init(void)
{
return ir_register_map(&empty_map);
}

void ir_rcmap_cleanup(void)
{
ir_unregister_map(&empty_map);
}
8 changes: 6 additions & 2 deletions trunk/include/media/ir-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ static inline int ir_input_register(struct input_dev *dev,
return -EINVAL;

ir_codes = get_rc_map(map_name);
if (!ir_codes)
return -EINVAL;
if (!ir_codes) {
ir_codes = get_rc_map(RC_MAP_EMPTY);

if (!ir_codes)
return -EINVAL;
}

rc = __ir_input_register(dev, ir_codes, props, driver_name);
if (rc < 0)
Expand Down

0 comments on commit 6f2cbf1

Please sign in to comment.