* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
Showing the changes to drivers/staging/lirc/lirc_sir.c (1 of 531 files). Show all
Unified · Split
| @@ -336,9 +336,8 @@ static ssize_t lirc_write(struct file *file, const char *buf, size_t n, · 335 unmodified lines | ||
| 336 | 336 | static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
| 337 | 337 | { |
| 338 | 338 | int retval = 0; |
| 339 | − unsigned long value = 0; | |
| 339 | + __u32 value = 0; | |
| 340 | 340 | #ifdef LIRC_ON_SA1100 |
| 341 | − unsigned int ivalue; | |
| 342 | 341 | |
| 343 | 342 | if (cmd == LIRC_GET_FEATURES) |
| 344 | 343 | value = LIRC_CAN_SEND_PULSE | |
| @@ -362,22 +361,22 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 17 unmodified lines | ||
| 362 | 361 | case LIRC_GET_FEATURES: |
| 363 | 362 | case LIRC_GET_SEND_MODE: |
| 364 | 363 | case LIRC_GET_REC_MODE: |
| 365 | − retval = put_user(value, (unsigned long *) arg); | |
| 364 | + retval = put_user(value, (__u32 *) arg); | |
| 366 | 365 | break; |
| 367 | 366 | |
| 368 | 367 | case LIRC_SET_SEND_MODE: |
| 369 | 368 | case LIRC_SET_REC_MODE: |
| 370 | − retval = get_user(value, (unsigned long *) arg); | |
| 369 | + retval = get_user(value, (__u32 *) arg); | |
| 371 | 370 | break; |
| 372 | 371 | #ifdef LIRC_ON_SA1100 |
| 373 | 372 | case LIRC_SET_SEND_DUTY_CYCLE: |
| 374 | − retval = get_user(ivalue, (unsigned int *) arg); | |
| 373 | + retval = get_user(value, (__u32 *) arg); | |
| 375 | 374 | if (retval) |
| 376 | 375 | return retval; |
| 377 | − if (ivalue <= 0 || ivalue > 100) | |
| 376 | + if (value <= 0 || value > 100) | |
| 378 | 377 | return -EINVAL; |
| 379 | − /* (ivalue/100)*(1000000/freq) */ | |
| 380 | − duty_cycle = ivalue; | |
| 378 | + /* (value/100)*(1000000/freq) */ | |
| 379 | + duty_cycle = value; | |
| 381 | 380 | pulse_width = (unsigned long) duty_cycle*10000/freq; |
| 382 | 381 | space_width = (unsigned long) 1000000L/freq-pulse_width; |
| 383 | 382 | if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) |
| @@ -386,12 +385,12 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 2 unmodified lines | ||
| 386 | 385 | space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; |
| 387 | 386 | break; |
| 388 | 387 | case LIRC_SET_SEND_CARRIER: |
| 389 | − retval = get_user(ivalue, (unsigned int *) arg); | |
| 388 | + retval = get_user(value, (__u32 *) arg); | |
| 390 | 389 | if (retval) |
| 391 | 390 | return retval; |
| 392 | − if (ivalue > 500000 || ivalue < 20000) | |
| 391 | + if (value > 500000 || value < 20000) | |
| 393 | 392 | return -EINVAL; |
| 394 | − freq = ivalue; | |
| 393 | + freq = value; | |
| 395 | 394 | pulse_width = (unsigned long) duty_cycle*10000/freq; |
| 396 | 395 | space_width = (unsigned long) 1000000L/freq-pulse_width; |
| 397 | 396 | if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) |
| @@ -457,6 +456,9 @@ static const struct file_operations lirc_fops = { · 59 unmodified lines | ||
| 457 | 456 | .write = lirc_write, |
| 458 | 457 | .poll = lirc_poll, |
| 459 | 458 | .unlocked_ioctl = lirc_ioctl, |
| 459 | +#ifdef CONFIG_COMPAT | |
| 460 | + .compat_ioctl = lirc_ioctl, | |
| 461 | +#endif | |
| 460 | 462 | .open = lirc_dev_fop_open, |
| 461 | 463 | .release = lirc_dev_fop_close, |
| 462 | 464 | .llseek = no_llseek, |