plustek: Driver doesn't work on >= 2.4.0-test8
Subject:
Re: Driver doesn't work on >= 2.4.0-test8
From:
Mark Bialkowski ####@####.####
Date:
16 Oct 2000 20:16:28 -0000
Message-Id: <20001016162046.A18832@cr504560-a>
Hey Gerhard:
Looks like a no-go on the sysdep-2.1.h update you sent. The problem seems
to be that the kernel simply doesn't recognize the get_user_ret and
put_user_ret symbols, since they were completely dropped from uaccess.h, so
it won't load the module even if you define the functions back into the
driver. A grep of the test9 source shows absolutely no sign of either
put_user_ret or get_user_ret.
It looks as if the equivalent to put_user_ret(a,b,return) in test8/9/beyond
is
if (put_user(a,b))
return value;
Yeah. It's that ugly. A couple examples I dug out from the kernel source:
drivers/net/wan/cosa.c:
***************
*** 1507,1513 ****
}
c=i;
#if 1
! put_user_ret(c,microcode, -23);
#else
*microcode = c;
#endif
--- 1510,1517 ----
}
c=i;
#if 1
! if (put_user(c, microcode))
! return -23; /* ??? */
#else
*microcode = c;
#endif
--------------
drivers/sbus/char/bpp.c
***************
*** 507,513 ****
if (pins & BPP_GP_PError) byte |= 0x40;
if (pins & BPP_GP_Busy) byte |= 0x80;
! put_user_ret(byte, c, -EFAULT);
c += 1;
remaining -= 1;
--- 507,514 ----
if (pins & BPP_GP_PError) byte |= 0x40;
if (pins & BPP_GP_Busy) byte |= 0x80;
! if (put_user(byte, c))
! return -EFAULT;
c += 1;
remaining -= 1;
***************
*** 685,691 ****
while (remaining > 0) {
unsigned char byte;
! get_user_ret(byte, c, -EFAULT);
c += 1;
rc = wait_for(BPP_GP_nAck, BPP_GP_Busy, TIME_IDLE_LIMIT,
minor);
--- 688,695 ----
while (remaining > 0) {
unsigned char byte;
! if (get_user(byte, c))
! return -EFAULT;
c += 1;
rc = wait_for(BPP_GP_nAck, BPP_GP_Busy, TIME_IDLE_LIMIT,
minor);
------
You get the idea.
Hope this helps you come up with a solution, and I'll hope for some magical
inspiration at this end.
-Mark