#ifndef TIOCGDEV
#define TIOCGDEV _IOR('T',0x32, unsigned int)
#endif
-static int tiocgdev(unsigned fd, unsigned cmd, unsigned int *ptr)
+static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr)
{
struct file *file = fget(fd);
ret = sys_ioctl(fd, RTC_IRQP_READ, (unsigned long)&val);
set_fs(oldfs);
if (!ret)
- ret = put_user(val, (unsigned int*) arg);
+ ret = put_user(val, (unsigned int __user *) arg);
return ret;
case RTC_IRQP_SET32:
ret = sys_ioctl(fd, RTC_EPOCH_READ, (unsigned long) &val);
set_fs(oldfs);
if (!ret)
- ret = put_user(val, (unsigned int*) arg);
+ ret = put_user(val, (unsigned int __user *) arg);
return ret;
case RTC_EPOCH_SET32:
struct mtrr_gentry g;
struct mtrr_sentry s;
int get = 0, err = 0;
- struct mtrr_gentry32 *g32 = (struct mtrr_gentry32 *)arg;
+ struct mtrr_gentry32 __user *g32 = (struct mtrr_gentry32 __user *)arg;
mm_segment_t oldfs = get_fs();
switch (cmd) {
arg = (unsigned long)&g;
} else {
- struct mtrr_sentry32 *s32 = (struct mtrr_sentry32 *)arg;
+ struct mtrr_sentry32 __user *s32 = (struct mtrr_sentry32 __user *)arg;
err = get_user(s.base, &s32->base);
err |= get_user(s.size, &s32->size);
err |= get_user(s.type, &s32->type);