Commit 72484230 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Trivial patch for logibusmouse.c

johnpol@2ka.mipt.ru: Re: Trivial patch for logibusmouse.c:
  > On Tue, Mar 19, 2002 at 03:22:58PM +1100, Rusty Russell wrote:
  > > Hi Russell,
  > >
  > > 	Please check this request_region() cleanup patch from Evgeniy
  > > Polyakov against 2.4 and 2.5.
  >
  > Both patches look fine, apart from the disgusting formatting being
  > different from the rest of the files.

  As you wish...

  > --
  > Russell King (rmk@arm.linux.org.uk)                The developer of
  > ARM Linux
  > http://www.arm.linux.org.uk/personal/aboutme.html


  	Evgeniy Polyakov ( s0mbre )
parent 65df45c8
......@@ -128,25 +128,28 @@ static struct busmouse busmouse = {
static int __init logi_busmouse_init(void)
{
if (check_region(LOGIBM_BASE, LOGIBM_EXTENT))
if (!request_region(LOGIBM_BASE, LOGIBM_EXTENT, "busmouse"))
return -EIO;
outb(MSE_CONFIG_BYTE, MSE_CONFIG_PORT);
outb(MSE_SIGNATURE_BYTE, MSE_SIGNATURE_PORT);
udelay(100L); /* wait for reply from mouse */
if (inb(MSE_SIGNATURE_PORT) != MSE_SIGNATURE_BYTE)
if (inb(MSE_SIGNATURE_PORT) != MSE_SIGNATURE_BYTE) {
release_region(LOGIBM_BASE, LOGIBM_EXTENT);
return -EIO;
}
outb(MSE_DEFAULT_MODE, MSE_CONFIG_PORT);
MSE_INT_OFF();
request_region(LOGIBM_BASE, LOGIBM_EXTENT, "busmouse");
msedev = register_busmouse(&busmouse);
if (msedev < 0)
if (msedev < 0) {
release_region(LOGIBM_BASE, LOGIBM_EXTENT);
printk(KERN_WARNING "Unable to register busmouse driver.\n");
}
else
printk(KERN_INFO "Logitech busmouse installed.\n");
return msedev < 0 ? msedev : 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment