From: Andrey Panin <pazke@orbita.don.sitek.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] check_region() removal: drivers/media/video/pms.c
Date: Mon, 19 Feb 2001 16:03:42 +0300 [thread overview]
Message-ID: <20010219160342.A31562@orbita1.ru> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 216 bytes --]
Hi all,
I think subject is self explaining :))
Best regards.
--
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
[-- Attachment #1.2: patch-pms --]
[-- Type: text/plain, Size: 1140 bytes --]
--- /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 */
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
reply other threads:[~2001-02-19 13:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010219160342.A31562@orbita1.ru \
--to=pazke@orbita.don.sitek.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®