From: Mike Anderson <andmike@us.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] Correct removal of procfs host enteries [2/2]
Date: Fri, 1 Aug 2003 13:11:49 -0700 [thread overview]
Message-ID: <20030801201149.GC3868@beaverton.ibm.com> (raw)
In-Reply-To: <20030801201020.GB3868@beaverton.ibm.com>
-andmike
--
Michael Anderson
andmike@us.ibm.com
DESC
This patch reduces the user of scsi_host present.
aic79xx_osm and aic7xxx_osm are 2.4 code. ioctl_probe has side effect of
needing present value.
EDESC
drivers/scsi/NCR53c406a.c | 5 +++--
drivers/scsi/aacraid/linit.c | 1 -
drivers/scsi/scsi_module.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff -puN drivers/scsi/NCR53c406a.c~shost_present drivers/scsi/NCR53c406a.c
--- patched-scsi-misc-2.5/drivers/scsi/NCR53c406a.c~shost_present Thu Jul 31 14:32:16 2003
+++ patched-scsi-misc-2.5-andmike/drivers/scsi/NCR53c406a.c Thu Jul 31 14:32:16 2003
@@ -450,6 +450,7 @@ static __inline__ int NCR53c406a_pio_wri
static int __init NCR53c406a_detect(Scsi_Host_Template * tpnt)
{
+ int present = 0;
struct Scsi_Host *shpnt = NULL;
#ifndef PORT_BASE
int i;
@@ -522,7 +523,7 @@ static int __init NCR53c406a_detect(Scsi
DEB(printk("NCR53c406a: using port_base 0x%x\n", port_base));
- tpnt->present = 1;
+ present = 1;
tpnt->proc_name = "NCR53c406a";
shpnt = scsi_register(tpnt, 0);
@@ -576,7 +577,7 @@ static int __init NCR53c406a_detect(Scsi
sprintf(info_msg, "NCR53c406a at 0x%x, IRQ %d, %s PIO mode.", port_base, irq_level, fast_pio ? "fast" : "slow");
#endif
- return (tpnt->present);
+ return (present);
#if USE_DMA
err_free_irq:
diff -puN drivers/scsi/aacraid/linit.c~shost_present drivers/scsi/aacraid/linit.c
--- patched-scsi-misc-2.5/drivers/scsi/aacraid/linit.c~shost_present Thu Jul 31 14:32:16 2003
+++ patched-scsi-misc-2.5-andmike/drivers/scsi/aacraid/linit.c Thu Jul 31 14:32:16 2003
@@ -295,7 +295,6 @@ static int aac_detect(Scsi_Host_Template
printk(KERN_WARNING "aacraid: unable to register \"aac\" device.\n");
}
- template->present = aac_count; /* # of cards of this type found */
return aac_count;
}
diff -puN drivers/scsi/scsi_module.c~shost_present drivers/scsi/scsi_module.c
--- patched-scsi-misc-2.5/drivers/scsi/scsi_module.c~shost_present Thu Jul 31 14:32:16 2003
+++ patched-scsi-misc-2.5-andmike/drivers/scsi/scsi_module.c Thu Jul 31 14:32:16 2003
@@ -33,7 +33,7 @@ static int __init init_this_scsi_driver(
INIT_LIST_HEAD(&sht->legacy_hosts);
sht->detect(sht);
- if (!sht->present)
+ if (list_empty(&sht->legacy_hosts))
return -ENODEV;
list_for_each_entry(shost, &sht->legacy_hosts, sht_legacy_list) {
_
prev parent reply other threads:[~2003-08-01 20:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-01 20:10 [PATCH] Correct removal of procfs host enteries [1/2] Mike Anderson
2003-08-01 20:11 ` Mike Anderson [this message]
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=20030801201149.GC3868@beaverton.ibm.com \
--to=andmike@us.ibm.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.