[PATCH] m68k: amiserial __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds ab14caec 2c7af511

+9 -10
+9 -10
drivers/char/amiserial.c
··· 1089 1089 */ 1090 1090 1091 1091 static int get_serial_info(struct async_struct * info, 1092 - struct serial_struct * retinfo) 1092 + struct serial_struct __user * retinfo) 1093 1093 { 1094 1094 struct serial_struct tmp; 1095 1095 struct serial_state *state = info->state; ··· 1113 1113 } 1114 1114 1115 1115 static int set_serial_info(struct async_struct * info, 1116 - struct serial_struct * new_info) 1116 + struct serial_struct __user * new_info) 1117 1117 { 1118 1118 struct serial_struct new_serial; 1119 1119 struct serial_state old_state, *state; ··· 1194 1194 * transmit holding register is empty. This functionality 1195 1195 * allows an RS485 driver to be written in user space. 1196 1196 */ 1197 - static int get_lsr_info(struct async_struct * info, unsigned int *value) 1197 + static int get_lsr_info(struct async_struct * info, unsigned int __user *value) 1198 1198 { 1199 1199 unsigned char status; 1200 1200 unsigned int result; ··· 1285 1285 struct async_struct * info = (struct async_struct *)tty->driver_data; 1286 1286 struct async_icount cprev, cnow; /* kernel counter temps */ 1287 1287 struct serial_icounter_struct icount; 1288 + void __user *argp = (void __user *)arg; 1288 1289 unsigned long flags; 1289 1290 1290 1291 if (serial_paranoia_check(info, tty->name, "rs_ioctl")) ··· 1300 1299 1301 1300 switch (cmd) { 1302 1301 case TIOCGSERIAL: 1303 - return get_serial_info(info, 1304 - (struct serial_struct *) arg); 1302 + return get_serial_info(info, argp); 1305 1303 case TIOCSSERIAL: 1306 - return set_serial_info(info, 1307 - (struct serial_struct *) arg); 1304 + return set_serial_info(info, argp); 1308 1305 case TIOCSERCONFIG: 1309 1306 return 0; 1310 1307 1311 1308 case TIOCSERGETLSR: /* Get line status register */ 1312 - return get_lsr_info(info, (unsigned int *) arg); 1309 + return get_lsr_info(info, argp); 1313 1310 1314 1311 case TIOCSERGSTRUCT: 1315 - if (copy_to_user((struct async_struct *) arg, 1312 + if (copy_to_user(argp, 1316 1313 info, sizeof(struct async_struct))) 1317 1314 return -EFAULT; 1318 1315 return 0; ··· 1369 1370 icount.brk = cnow.brk; 1370 1371 icount.buf_overrun = cnow.buf_overrun; 1371 1372 1372 - if (copy_to_user((void *)arg, &icount, sizeof(icount))) 1373 + if (copy_to_user(argp, &icount, sizeof(icount))) 1373 1374 return -EFAULT; 1374 1375 return 0; 1375 1376 case TIOCSERGWILD: