plustek@linuxhacker.org
plustek@linuxhacker.org
On Mon, 06 Nov 2000, Luc Stepniewski wrote:
> Hello,
>
> I'm trying to compile the plustek module on a 2.4-test9 kernel. The
> compilation goes well, but when I try to insmod the generated module,
> it rejects it because of some missing symbols:
>
> root@eurythro:plustek_driver# insmod pt_drv
> Using /lib/modules/2.4.0-test9/misc/pt_drv.o
> /lib/modules/2.4.0-test9/misc/pt_drv.o: unresolved symbol get_user_ret
> /lib/modules/2.4.0-test9/misc/pt_drv.o: unresolved symbol put_user_ret
>
> Did these functions disappear between the test7 and test9 ?
>
Hi Luc,
yes they disappeard! They originally were coded as macros. Why the
kernel-guys decided to remove these functions? I don't know.
Sometimes it's hard to understand some changes ;-))
Anyway, add the code below to the file sysdep-2.1.h, recompile it and the
driver should load:
Gerhard
-----------------------------------------------------
/* starting with 2.4.0-test8, they removed the put_user_ret and get_user_ret
* macros, so we recode'em
*/
#ifdef LINUX_24
#ifndef put_user_ret
# define put_user_ret(x,ptr,ret) ({ if (put_user(x,ptr)) return ret; })
#endif
#ifndef get_user_ret
# define get_user_ret(x,ptr,ret) ({ if (get_user(x,ptr)) return ret; })
#endif
#endif
-----------------------------------------------------
plustek@linuxhacker.org