]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Mar 2011 21:22:10 +0000 (13:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Mar 2011 21:22:10 +0000 (13:22 -0800)
* 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] mantis_pci: remove asm/pgtable.h include
  [media] tda829x: fix regression in probe functions
  [media] mceusb: don't claim multifunction device non-IR parts
  [media] nuvoton-cir: fix wake from suspend
  [media] cx18: Add support for Hauppauge HVR-1600 models with s5h1411
  [media] ivtv: Fix corrective action taken upon DMA ERR interrupt to avoid hang
  [media] cx25840: fix probing of cx2583x chips
  [media] cx23885: Remove unused 'err:' labels to quiet compiler warning
  [media] cx23885: Revert "Check for slave nack on all transactions"
  [media] DiB7000M: add pid filtering
  [media] Fix sysfs rc protocol lookup for rc-5-sz
  [media] au0828: fix VBI handling when in V4L2 streaming mode
  [media] ir-raw: Properly initialize the IR event (BZ#27202)
  [media] s2255drv: firmware re-loading changes
  [media] Fix double free of video_device in mem2mem_testdev
  [media] DM04/QQBOX memcpy to const char fix

1  2 
drivers/media/rc/rc-main.c

index 512a2f4ada0e113ccc213ff5a5c50d0d93eaaf90,e5b29a4c691e584baffd1b0e56a7545e22bbb56e..5b4422ef4e6d4705566bc8f45a23cf6a9e9719fc
@@@ -458,27 -458,21 +458,27 @@@ static int ir_getkeycode(struct input_d
                index = ir_lookup_by_scancode(rc_map, scancode);
        }
  
 -      if (index >= rc_map->len) {
 -              if (!(ke->flags & INPUT_KEYMAP_BY_INDEX))
 -                      IR_dprintk(1, "unknown key for scancode 0x%04x\n",
 -                                 scancode);
 +      if (index < rc_map->len) {
 +              entry = &rc_map->scan[index];
 +
 +              ke->index = index;
 +              ke->keycode = entry->keycode;
 +              ke->len = sizeof(entry->scancode);
 +              memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
 +
 +      } else if (!(ke->flags & INPUT_KEYMAP_BY_INDEX)) {
 +              /*
 +               * We do not really know the valid range of scancodes
 +               * so let's respond with KEY_RESERVED to anything we
 +               * do not have mapping for [yet].
 +               */
 +              ke->index = index;
 +              ke->keycode = KEY_RESERVED;
 +      } else {
                retval = -EINVAL;
                goto out;
        }
  
 -      entry = &rc_map->scan[index];
 -
 -      ke->index = index;
 -      ke->keycode = entry->keycode;
 -      ke->len = sizeof(entry->scancode);
 -      memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
 -
        retval = 0;
  
  out:
@@@ -850,7 -844,7 +850,7 @@@ static ssize_t store_protocols(struct d
                        count++;
                } else {
                        for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
-                               if (!strncasecmp(tmp, proto_names[i].name, strlen(proto_names[i].name))) {
+                               if (!strcasecmp(tmp, proto_names[i].name)) {
                                        tmp += strlen(proto_names[i].name);
                                        mask = proto_names[i].type;
                                        break;