-/**
- * __ir_nec_decode() - Decode one NEC pulsecode
- * @input_dev: the struct input_dev descriptor of the device
- * @evs: event array with type/duration of pulse/space
- * @len: length of the array
- * @pos: position to start seeking for a code
- * This function returns -EINVAL if no pulse got decoded,
- * 0 if buffer is empty and 1 if one keycode were handled.
- */
-static int __ir_nec_decode(struct input_dev *input_dev,
- struct ir_raw_event *evs,
- int len, int *pos)
-{
- struct ir_input_dev *ir = input_get_drvdata(input_dev);
- int count = -1;
- int ircode = 0, not_code = 0;
-
- /* Be sure that the first event is an start one and is a pulse */
- for (; *pos < len; (*pos)++) {
- /* Very long delays are considered as start events */
- if (evs[*pos].delta.tv_nsec > MAX_NEC_TIME)
- break;
- if (evs[*pos].type & IR_START_EVENT)
- break;
- IR_dprintk(1, "%luus: Spurious NEC %s\n",
- (evs[*pos].delta.tv_nsec + 500) / 1000,
- (evs[*pos].type & IR_SPACE) ? "space" : "pulse");