diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-11-17 15:46:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 08:16:51 -0200 |
commit | 2f4f58d689dd71dea67407b74405a3c43e797cb1 (patch) | |
tree | 8f02ac4a3c8eccc99ee3dae8468e7e5f4c00995c /drivers/media/rc/rc-main.c | |
parent | b088ba658b3438056dab4d744701364db3f08b9a (diff) |
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
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.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index caa8d70de72..b989f5d98d5 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -94,7 +94,7 @@ void ir_unregister_map(struct rc_keymap *map) EXPORT_SYMBOL_GPL(ir_unregister_map); -static struct ir_scancode empty[] = { +static struct rc_map_table empty[] = { { 0x2a, KEY_COFFEE }, }; @@ -123,8 +123,8 @@ static int ir_create_table(struct rc_map *rc_map, { rc_map->name = name; rc_map->rc_type = rc_type; - rc_map->alloc = roundup_pow_of_two(size * sizeof(struct ir_scancode)); - rc_map->size = rc_map->alloc / sizeof(struct ir_scancode); + rc_map->alloc = roundup_pow_of_two(size * sizeof(struct rc_map_table)); + rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); rc_map->scan = kmalloc(rc_map->alloc, GFP_KERNEL); if (!rc_map->scan) return -ENOMEM; @@ -161,8 +161,8 @@ static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags) { unsigned int oldalloc = rc_map->alloc; unsigned int newalloc = oldalloc; - struct ir_scancode *oldscan = rc_map->scan; - struct ir_scancode *newscan; + struct rc_map_table *oldscan = rc_map->scan; + struct rc_map_table *newscan; if (rc_map->size == rc_map->len) { /* All entries in use -> grow keytable */ @@ -188,10 +188,10 @@ static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags) return -ENOMEM; } - memcpy(newscan, rc_map->scan, rc_map->len * sizeof(struct ir_scancode)); + memcpy(newscan, rc_map->scan, rc_map->len * sizeof(struct rc_map_table)); rc_map->scan = newscan; rc_map->alloc = newalloc; - rc_map->size = rc_map->alloc / sizeof(struct ir_scancode); + rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); kfree(oldscan); return 0; } @@ -221,7 +221,7 @@ static unsigned int ir_update_mapping(struct rc_dev *dev, index, rc_map->scan[index].scancode); rc_map->len--; memmove(&rc_map->scan[index], &rc_map->scan[index+ 1], - (rc_map->len - index) * sizeof(struct ir_scancode)); + (rc_map->len - index) * sizeof(struct rc_map_table)); } else { IR_dprintk(1, "#%d: %s scan 0x%04x with key 0x%04x\n", index, @@ -300,7 +300,7 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev, /* i is the proper index to insert our new keycode */ if (i < rc_map->len) memmove(&rc_map->scan[i + 1], &rc_map->scan[i], - (rc_map->len - i) * sizeof(struct ir_scancode)); + (rc_map->len - i) * sizeof(struct rc_map_table)); rc_map->scan[i].scancode = scancode; rc_map->scan[i].keycode = KEY_RESERVED; rc_map->len++; @@ -440,7 +440,7 @@ static int ir_getkeycode(struct input_dev *idev, { struct rc_dev *rdev = input_get_drvdata(idev); struct rc_map *rc_map = &rdev->rc_map; - struct ir_scancode *entry; + struct rc_map_table *entry; unsigned long flags; unsigned int index; unsigned int scancode; |