lkml.org 
[lkml]   [2003]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectAM53C974 request region.
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.019 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site