History

Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* '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 ...

Linus Torvalds committed 16 years ago

Commit 08516682 parents 00ebb63 7655e59531 files · +41145 −13099Browse files

Showing the changes to drivers/staging/lirc/lirc_sir.c (1 of 531 files). Show all

Unified · Split

drivers/staging/lirc/lirc_sir.c+13−11
@@ -336,9 +336,8 @@ static ssize_t lirc_write(struct file *file, const char *buf, size_t n, · 335 unmodified lines
336336 static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
337337 {
338338 int retval = 0;
339− unsigned long value = 0;
339+ __u32 value = 0;
340340 #ifdef LIRC_ON_SA1100
341− unsigned int ivalue;
342341
343342 if (cmd == LIRC_GET_FEATURES)
344343 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
362361 case LIRC_GET_FEATURES:
363362 case LIRC_GET_SEND_MODE:
364363 case LIRC_GET_REC_MODE:
365− retval = put_user(value, (unsigned long *) arg);
364+ retval = put_user(value, (__u32 *) arg);
366365 break;
367366
368367 case LIRC_SET_SEND_MODE:
369368 case LIRC_SET_REC_MODE:
370− retval = get_user(value, (unsigned long *) arg);
369+ retval = get_user(value, (__u32 *) arg);
371370 break;
372371 #ifdef LIRC_ON_SA1100
373372 case LIRC_SET_SEND_DUTY_CYCLE:
374− retval = get_user(ivalue, (unsigned int *) arg);
373+ retval = get_user(value, (__u32 *) arg);
375374 if (retval)
376375 return retval;
377− if (ivalue <= 0 || ivalue > 100)
376+ if (value <= 0 || value > 100)
378377 return -EINVAL;
379− /* (ivalue/100)*(1000000/freq) */
380− duty_cycle = ivalue;
378+ /* (value/100)*(1000000/freq) */
379+ duty_cycle = value;
381380 pulse_width = (unsigned long) duty_cycle*10000/freq;
382381 space_width = (unsigned long) 1000000L/freq-pulse_width;
383382 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
386385 space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY;
387386 break;
388387 case LIRC_SET_SEND_CARRIER:
389− retval = get_user(ivalue, (unsigned int *) arg);
388+ retval = get_user(value, (__u32 *) arg);
390389 if (retval)
391390 return retval;
392− if (ivalue > 500000 || ivalue < 20000)
391+ if (value > 500000 || value < 20000)
393392 return -EINVAL;
394− freq = ivalue;
393+ freq = value;
395394 pulse_width = (unsigned long) duty_cycle*10000/freq;
396395 space_width = (unsigned long) 1000000L/freq-pulse_width;
397396 if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY)
@@ -457,6 +456,9 @@ static const struct file_operations lirc_fops = { · 59 unmodified lines
457456 .write = lirc_write,
458457 .poll = lirc_poll,
459458 .unlocked_ioctl = lirc_ioctl,
459+#ifdef CONFIG_COMPAT
460+ .compat_ioctl = lirc_ioctl,
461+#endif
460462 .open = lirc_dev_fop_open,
461463 .release = lirc_dev_fop_close,
462464 .llseek = no_llseek,