From: davej@codemonkey.org.uk
To: james.bottomley@steeleye.com
Cc: linux-kernel@vger.kernel.org
Subject: AM53C974 request region.
Date: Thu, 15 May 2003 04:31:11 +0100 [thread overview]
Message-ID: <200305150331.h4F3VBVS000687@deviant.impure.org.uk> (raw)
Request port before using it.
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/scsi/AM53C974.c linux-2.5/drivers/scsi/AM53C974.c
--- bk-linus/drivers/scsi/AM53C974.c 2003-05-13 11:51:12.000000000 +0100
+++ linux-2.5/drivers/scsi/AM53C974.c 2003-05-13 11:59:32.000000000 +0100
@@ -732,6 +732,12 @@ static int __init AM53C974_init(Scsi_Ho
hostdata->disconnecting = 0;
hostdata->dma_busy = 0;
+ if (!request_region (instance->io_port, 128, "AM53C974")) {
+ printk ("AM53C974 (scsi%d): Could not get IO region %04lx.\n",
+ instance->host_no, instance->io_port);
+ scsi_unregister(instance);
+ return 0;
+ }
/* Set up an interrupt handler if we aren't already sharing an IRQ with another board */
for (search = first_host;
search && (((the_template != NULL) && (search->hostt != the_template)) ||
@@ -2442,6 +2448,7 @@ static int AM53C974_reset(Scsi_Cmnd * cm
static int AM53C974_release(struct Scsi_Host *shp)
{
free_irq(shp->irq, shp);
+ release_region(shp->io_port, 128);
scsi_unregister(shp);
return 0;
}
reply other threads:[~2003-05-15 3:24 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=200305150331.h4F3VBVS000687@deviant.impure.org.uk \
--to=davej@codemonkey.org.uk \
--cc=james.bottomley@steeleye.com \
--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
Powered by JetHome