Hi all,
I think subject is self explaining :))
Best regards.
--
Andrey Panin | Embedded systems software engineer
[EMAIL PROTECTED] | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
--- /linux/drivers/media/video/pms.c.orig Mon Feb 19 19:33:26 2001
+++ /linux/drivers/media/video/pms.c Mon Feb 19 22:05:34 2001
@@ -934,14 +934,15 @@
0xE4
};
- if(check_region(0x9A01,1))
+ if (!request_region(0x9A01, 1, "Mediavision PMS config"))
{
printk(KERN_WARNING "mediavision: unable to detect: 0x9A01 in use.\n");
return -EBUSY;
}
- if(check_region(io_port,3))
+ if (!request_region(io_port, 3, "Mediavision PMS"))
{
printk(KERN_WARNING "mediavision: I/O port %d in use.\n", io_port);
+ release_region(0x9A01, 1);
return -EBUSY;
}
outb(0xB8, 0x9A01); /* Unlock */
@@ -960,16 +961,16 @@
else
idec=0;
- printk(KERN_INFO "PMS type is %d\n", idec);
- if(idec==0)
- return -ENODEV;
+ printk(KERN_INFO "PMS type is %d\n", idec);
+ if(idec == 0) {
+ release_region(io_port, 3);
+ release_region(0x9A01, 1);
+ return -ENODEV;
+ }
/*
* Ok we have a PMS of some sort
*/
-
- request_region(io_port,3, "Mediavision PMS");
- request_region(0x9A01, 1, "Mediavision PMS config");
mvv_write(0x04, mem_base>>12); /* Set the memory area */
PGP signature