diff -u -X /usr/dontdiff /linux.vanilla/drivers/char/msbusmouse.c /linux/drivers/char/msbusmouse.c --- /linux.vanilla/drivers/char/msbusmouse.c Tue Jun 12 10:51:22 2001 +++ /linux/drivers/char/msbusmouse.c Tue Jun 12 11:38:18 2001 @@ -113,8 +113,9 @@ static int open_mouse(struct inode * inode, struct file * file) { - if (request_irq(mouse_irq, ms_mouse_interrupt, 0, "MS Busmouse", NULL)) - return -EBUSY; + int retval; + if ((retval = request_irq(mouse_irq, ms_mouse_interrupt, SA_INTERRUPT | SA_SAMPLE_RANDOM, "MS Busmouse", NULL))) + return retval; outb(MS_MSE_START, MS_MSE_CONTROL_PORT); MS_MSE_INT_ON(); @@ -130,8 +131,8 @@ int present = 0; int mse_byte, i; - if (check_region(MS_MSE_CONTROL_PORT, 0x04)) - return -ENODEV; + if (!request_region(MS_MSE_CONTROL_PORT, 0x04, "MS Busmouse")); + return -EBUSY; if (inb_p(MS_MSE_SIGNATURE_PORT) == 0xde) { @@ -147,14 +148,17 @@ present = 0; } } - if (present == 0) + if (present == 0) { + release_region(MS_MSE_CONTROL_PORT, 0x04); return -EIO; + } MS_MSE_INT_OFF(); - request_region(MS_MSE_CONTROL_PORT, 0x04, "MS Busmouse"); + msedev = register_busmouse(&msbusmouse); - if (msedev < 0) + if (msedev < 0) { printk(KERN_WARNING "Unable to register msbusmouse driver.\n"); - else + release_region(MS_MSE_CONTROL_PORT, 0x04); + } else printk(KERN_INFO "Microsoft BusMouse detected and installed.\n"); return msedev < 0 ? msedev : 0; }