|
@@ -98,7 +98,7 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf,
|
|
|
|
|
|
+static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
|
|
size_t n, loff_t *ppos)
|
|
size_t n, loff_t *ppos)
|
|
{
|
|
{
|
|
struct lirc_codec *lirc;
|
|
struct lirc_codec *lirc;
|
|
@@ -140,10 +140,11 @@ out:
|
|
}
|
|
}
|
|
|
|
|
|
static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
|
|
static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
|
|
- unsigned long __user arg)
|
|
|
|
|
|
+ unsigned long arg)
|
|
{
|
|
{
|
|
struct lirc_codec *lirc;
|
|
struct lirc_codec *lirc;
|
|
struct rc_dev *dev;
|
|
struct rc_dev *dev;
|
|
|
|
+ u32 __user *argp = (u32 __user *)(arg);
|
|
int ret = 0;
|
|
int ret = 0;
|
|
__u32 val = 0, tmp;
|
|
__u32 val = 0, tmp;
|
|
|
|
|
|
@@ -156,7 +157,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
|
|
|
if (_IOC_DIR(cmd) & _IOC_WRITE) {
|
|
if (_IOC_DIR(cmd) & _IOC_WRITE) {
|
|
- ret = get_user(val, (__u32 *)arg);
|
|
|
|
|
|
+ ret = get_user(val, argp);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -265,7 +266,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
|
|
}
|
|
}
|
|
|
|
|
|
if (_IOC_DIR(cmd) & _IOC_READ)
|
|
if (_IOC_DIR(cmd) & _IOC_READ)
|
|
- ret = put_user(val, (__u32 *)arg);
|
|
|
|
|
|
+ ret = put_user(val, argp);
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|