Source
57
57
anslcd_write( struct file * file, const char __user * buf,
58
58
size_t count, loff_t *ppos )
59
59
{
60
60
const char __user *p = buf;
61
61
int i;
62
62
63
63
#ifdef DEBUG
64
64
printk(KERN_DEBUG "LCD: write\n");
65
65
#endif
66
66
67
-
if (!access_ok(VERIFY_READ, buf, count))
67
+
if (!access_ok(buf, count))
68
68
return -EFAULT;
69
69
70
70
mutex_lock(&anslcd_mutex);
71
71
for ( i = *ppos; count > 0; ++i, ++p, --count )
72
72
{
73
73
char c;
74
74
__get_user(c, p);
75
75
anslcd_write_byte_data( c );
76
76
}
77
77
mutex_unlock(&anslcd_mutex);