Re: Problem with 1.3.31, compiling CONFIG_MODVERSIONS=y mouse modules

Peter Clements (peter@shylock.zynet.co.uk)
Mon, 9 Oct 1995 09:44:41 +0100 (BST)


>
> On Thu, 5 Oct 1995, Juha Virtanen wrote:
>
> > How did you manage to compile these? I've never been able to compile
> > any of mouse modules. Compilation always dies in mouse.c, line 139
> > in undeclared identifier mouse_data (sorry, can't give exact
> > error message because my mouse just died).
>
> Oh, sorry, I keep forgetting to post that patch....This is the one I use,
> though I haven't been able to test it. It compiles fine, and *seems* to be
> what the author intended. It fixes a compile error in mouse.c when you're
> compiling CONFIG_MODVERSIONS=y mouse modules....
>
>
> :) lilo
>
>
> --- linux/drivers/char/mouse.c Thu Sep 14 00:07:08 1995
> +++ linux/drivers/char/mouse.c.NEW Wed Oct 4 12:34:57 1995
> @@ -136,7 +136,7 @@
> #ifdef MODULE
> void cleanup_module(void)
> {
> - mouse_data *c = mouse_list, *n;
> + struct mouse *c = &mouse_list, *n;
> if (MOD_IN_USE) {
> printk("mouse: in use, remove delayed\n");
> return;
>

I'm not sure that that patch is a good idea. From my perusal of the various
mouse drivers, all of the `struct mouse' are statically allocated data
structures, so you really don't want to kfree() them.

AFAICS the only thing cleanup_module() should do is call unregister_chrdev().

-- 
Peter Clements              peter@shylock.zynet.co.uk
                            peter@shylock.demon.co.uk
                            pclements@cix.compulink.co.uk