From: Stephen Hemminger <shemminger@osdl.org>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] isp16 -- use request_region
Date: Mon, 22 Sep 2003 15:33:53 -0700 [thread overview]
Message-ID: <20030922153353.7eb19898.shemminger@osdl.org> (raw)
Change isp16 from check_region to request_region.
diff -Nru a/drivers/cdrom/isp16.c b/drivers/cdrom/isp16.c
--- a/drivers/cdrom/isp16.c Mon Sep 22 15:33:46 2003
+++ b/drivers/cdrom/isp16.c Mon Sep 22 15:33:46 2003
@@ -121,14 +121,14 @@
return (0);
}
- if (check_region(ISP16_IO_BASE, ISP16_IO_SIZE)) {
+ if (!request_region(ISP16_IO_BASE, ISP16_IO_SIZE, "isp16")) {
printk("ISP16: i/o ports already in use.\n");
- return (-EIO);
+ goto ret_eio;
}
if ((isp16_type = isp16_detect()) < 0) {
printk("ISP16: no cdrom interface found.\n");
- return (-EIO);
+ goto err;
}
printk(KERN_INFO
@@ -148,20 +148,24 @@
else {
printk("ISP16: %s not supported by cdrom interface.\n",
isp16_cdrom_type);
- return (-EIO);
+ goto err;
}
if (isp16_cdi_config(isp16_cdrom_base, expected_drive,
isp16_cdrom_irq, isp16_cdrom_dma) < 0) {
printk
("ISP16: cdrom interface has not been properly configured.\n");
- return (-EIO);
+ goto err;
}
printk(KERN_INFO
"ISP16: cdrom interface set up with io base 0x%03X, irq %d, dma %d,"
" type %s.\n", isp16_cdrom_base, isp16_cdrom_irq,
isp16_cdrom_dma, isp16_cdrom_type);
return (0);
+ err:
+ release_region(ISP16_IO_BASE, ISP16_IO_SIZE);
+ ret_eio:
+ return (-EIO);
}
static short __init isp16_detect(void)
reply other threads:[~2003-09-22 22:34 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=20030922153353.7eb19898.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=axboe@suse.de \
--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;
as well as URLs for NNTP newsgroup(s).