* number of bytes actually transferred.
*/
static int
-isdnloop_readstatus(u_char * buf, int len, int user, isdnloop_card * card)
+isdnloop_readstatus(u_char __user *buf, int len, isdnloop_card * card)
{
int count;
- u_char *p;
+ u_char __user *p;
for (p = buf, count = 0; count < len; p++, count++) {
if (card->msg_buf_read == card->msg_buf_write)
return count;
- if (user)
- put_user(*card->msg_buf_read++, p);
- else
- *p = *card->msg_buf_read++;
+ put_user(*card->msg_buf_read++, p);
if (card->msg_buf_read > card->msg_buf_end)
card->msg_buf_read = card->msg_buf;
}
}
static int
-if_writecmd(const u_char * buf, int len, int user, int id, int channel)
+if_writecmd(const u_char __user *buf, int len, int id, int channel)
{
isdnloop_card *card = isdnloop_findcard(id);
if (card) {
if (!card->flags & ISDNLOOP_FLAGS_RUNNING)
return -ENODEV;
- return (isdnloop_writecmd(buf, len, user, card));
+ return (isdnloop_writecmd(buf, len, 1, card));
}
printk(KERN_ERR
"isdnloop: if_writecmd called with invalid driverId!\n");
}
static int
-if_readstatus(u_char * buf, int len, int user, int id, int channel)
+if_readstatus(u_char __user *buf, int len, int id, int channel)
{
isdnloop_card *card = isdnloop_findcard(id);
if (card) {
if (!card->flags & ISDNLOOP_FLAGS_RUNNING)
return -ENODEV;
- return (isdnloop_readstatus(buf, len, user, card));
+ return (isdnloop_readstatus(buf, len, card));
}
printk(KERN_ERR
"isdnloop: if_readstatus called with invalid driverId!\n");