aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/rc-main.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-11-17 13:56:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:52 -0500
commitd100e659b61a735c3343b3d82c1c009b04072cdd (patch)
treed80eedc6a9a51787b4fd2307977b9886a316f122 /drivers/media/rc/rc-main.c
parent2f4f58d689dd71dea67407b74405a3c43e797cb1 (diff)
[media] rc: use rc_map_ prefix for all rc map tables
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r--drivers/media/rc/rc-main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index b989f5d98d5f..0b0524c29325 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -31,9 +31,9 @@
31static LIST_HEAD(rc_map_list); 31static LIST_HEAD(rc_map_list);
32static DEFINE_SPINLOCK(rc_map_lock); 32static DEFINE_SPINLOCK(rc_map_lock);
33 33
34static struct rc_keymap *seek_rc_map(const char *name) 34static struct rc_map_list *seek_rc_map(const char *name)
35{ 35{
36 struct rc_keymap *map = NULL; 36 struct rc_map_list *map = NULL;
37 37
38 spin_lock(&rc_map_lock); 38 spin_lock(&rc_map_lock);
39 list_for_each_entry(map, &rc_map_list, list) { 39 list_for_each_entry(map, &rc_map_list, list) {
@@ -47,10 +47,10 @@ static struct rc_keymap *seek_rc_map(const char *name)
47 return NULL; 47 return NULL;
48} 48}
49 49
50struct rc_map *get_rc_map(const char *name) 50struct rc_map *rc_map_get(const char *name)
51{ 51{
52 52
53 struct rc_keymap *map; 53 struct rc_map_list *map;
54 54
55 map = seek_rc_map(name); 55 map = seek_rc_map(name);
56#ifdef MODULE 56#ifdef MODULE
@@ -74,31 +74,31 @@ struct rc_map *get_rc_map(const char *name)
74 74
75 return &map->map; 75 return &map->map;
76} 76}
77EXPORT_SYMBOL_GPL(get_rc_map); 77EXPORT_SYMBOL_GPL(rc_map_get);
78 78
79int ir_register_map(struct rc_keymap *map) 79int rc_map_register(struct rc_map_list *map)
80{ 80{
81 spin_lock(&rc_map_lock); 81 spin_lock(&rc_map_lock);
82 list_add_tail(&map->list, &rc_map_list); 82 list_add_tail(&map->list, &rc_map_list);
83 spin_unlock(&rc_map_lock); 83 spin_unlock(&rc_map_lock);
84 return 0; 84 return 0;
85} 85}
86EXPORT_SYMBOL_GPL(ir_register_map); 86EXPORT_SYMBOL_GPL(rc_map_register);
87 87
88void ir_unregister_map(struct rc_keymap *map) 88void rc_map_unregister(struct rc_map_list *map)
89{ 89{
90 spin_lock(&rc_map_lock); 90 spin_lock(&rc_map_lock);
91 list_del(&map->list); 91 list_del(&map->list);
92 spin_unlock(&rc_map_lock); 92 spin_unlock(&rc_map_lock);
93} 93}
94EXPORT_SYMBOL_GPL(ir_unregister_map); 94EXPORT_SYMBOL_GPL(rc_map_unregister);
95 95
96 96
97static struct rc_map_table empty[] = { 97static struct rc_map_table empty[] = {
98 { 0x2a, KEY_COFFEE }, 98 { 0x2a, KEY_COFFEE },
99}; 99};
100 100
101static struct rc_keymap empty_map = { 101static struct rc_map_list empty_map = {
102 .map = { 102 .map = {
103 .scan = empty, 103 .scan = empty,
104 .size = ARRAY_SIZE(empty), 104 .size = ARRAY_SIZE(empty),
@@ -996,9 +996,9 @@ int rc_register_device(struct rc_dev *dev)
996 if (!dev || !dev->map_name) 996 if (!dev || !dev->map_name)
997 return -EINVAL; 997 return -EINVAL;
998 998
999 rc_map = get_rc_map(dev->map_name); 999 rc_map = rc_map_get(dev->map_name);
1000 if (!rc_map) 1000 if (!rc_map)
1001 rc_map = get_rc_map(RC_MAP_EMPTY); 1001 rc_map = rc_map_get(RC_MAP_EMPTY);
1002 if (!rc_map || !rc_map->scan || rc_map->size == 0) 1002 if (!rc_map || !rc_map->scan || rc_map->size == 0)
1003 return -EINVAL; 1003 return -EINVAL;
1004 1004
@@ -1113,7 +1113,7 @@ static int __init rc_core_init(void)
1113 1113
1114 /* Initialize/load the decoders/keymap code that will be used */ 1114 /* Initialize/load the decoders/keymap code that will be used */
1115 ir_raw_init(); 1115 ir_raw_init();
1116 ir_register_map(&empty_map); 1116 rc_map_register(&empty_map);
1117 1117
1118 return 0; 1118 return 0;
1119} 1119}
@@ -1121,7 +1121,7 @@ static int __init rc_core_init(void)
1121static void __exit rc_core_exit(void) 1121static void __exit rc_core_exit(void)
1122{ 1122{
1123 class_unregister(&ir_input_class); 1123 class_unregister(&ir_input_class);
1124 ir_unregister_map(&empty_map); 1124 rc_map_unregister(&empty_map);
1125} 1125}
1126 1126
1127module_init(rc_core_init); 1127module_init(rc_core_init);