~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/media/rc/ir-raw.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        s64                     delta; /* ns */
115
115
        DEFINE_IR_RAW_EVENT(ev);
116
116
        int                     rc = 0;
 
117
        int                     delay;
117
118
 
118
119
        if (!dev->raw)
119
120
                return -EINVAL;
120
121
 
121
122
        now = ktime_get();
122
123
        delta = ktime_to_ns(ktime_sub(now, dev->raw->last_event));
 
124
        delay = MS_TO_NS(dev->input_dev->rep[REP_DELAY]);
123
125
 
124
126
        /* Check for a long duration since last event or if we're
125
127
         * being called for the first time, note that delta can't
126
128
         * possibly be negative.
127
129
         */
128
 
        if (delta > IR_MAX_DURATION || !dev->raw->last_type)
 
130
        if (delta > delay || !dev->raw->last_type)
129
131
                type |= IR_START_EVENT;
130
132
        else
131
133
                ev.duration = delta;