aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-10-08 16:24:21 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:18:34 -0400
commitbe1f985ffa49467f604318182616678b3e5184fd (patch)
tree3445d817db48005ed442fd03009ac6ff68e84514 /include/media
parentd322bf4ab2b513d03bd53b4436dbf6f2a36a7a76 (diff)
[media] IR/lirc: further ioctl portability fixups
>From Joris van Rantwijk <jorispubl@xs4all.nl>: I tested lirc_serial and found that it works fine. Except the LIRC ioctls do not work in my 64-bit-kernel/32-bit-user setup. I added compat_ioctl entries in the drivers to fix this. While doing so, I noticed inconsistencies in the argument type of the LIRC ioctls. All ioctls are declared in lirc.h as having argument type __u32, however there are a few places where the driver calls get_user/put_user with an unsigned long argument. The patch below changes lirc_dev and lirc_serial to use __u32 for all ioctl arguments, and adds compat_ioctl entries. It should probably also be done in the other low-level drivers, but I don't have hardware to test those. I've dropped the .compat_ioctl addition from Joris' original patch, as I swear the non-compat definition should now work for both 32-bit and 64-bit userspace. Technically, I think we still need/want a in getting a reply to you). Reported-by: Joris van Rantwijk <jorispubl@xs4all.nl> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/lirc_dev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
index 71a896e7b208..54780a560d0e 100644
--- a/include/media/lirc_dev.h
+++ b/include/media/lirc_dev.h
@@ -125,10 +125,10 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
125struct lirc_driver { 125struct lirc_driver {
126 char name[40]; 126 char name[40];
127 int minor; 127 int minor;
128 unsigned long code_length; 128 __u32 code_length;
129 unsigned int buffer_size; /* in chunks holding one code each */ 129 unsigned int buffer_size; /* in chunks holding one code each */
130 int sample_rate; 130 int sample_rate;
131 unsigned long features; 131 __u32 features;
132 132
133 unsigned int chunk_size; 133 unsigned int chunk_size;
134 134