diff options
Diffstat (limited to 'drivers/staging/media/lirc/lirc_parallel.c')
-rw-r--r-- | drivers/staging/media/lirc/lirc_parallel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/lirc/lirc_parallel.c b/drivers/staging/media/lirc/lirc_parallel.c index 19c5c21..c140834 100644 --- a/drivers/staging/media/lirc/lirc_parallel.c +++ b/drivers/staging/media/lirc/lirc_parallel.c @@ -161,8 +161,8 @@ static unsigned int init_lirc_timer(void) || (now.tv_sec == tv.tv_sec && now.tv_usec < tv.tv_usec))); - timeelapsed = ((now.tv_sec + 1 - tv.tv_sec)*1000000 - + (now.tv_usec - tv.tv_usec)); + timeelapsed = (now.tv_sec + 1 - tv.tv_sec)*1000000 + + (now.tv_usec - tv.tv_usec); if (count >= 1000 && timeelapsed > 0) { if (default_timer == 0) { /* autodetect timer */ @@ -336,7 +336,7 @@ static ssize_t lirc_read(struct file *filep, char __user *buf, size_t n, set_current_state(TASK_INTERRUPTIBLE); while (count < n) { if (rptr != wptr) { - if (copy_to_user(buf+count, (char *) &rbuf[rptr], + if (copy_to_user(buf+count, &rbuf[rptr], sizeof(int))) { result = -EFAULT; break; |