From: Christoph Hellwig <hch@lst.de>
To: James.Bottomley@steeleye.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] allow NULL dev argument to scsi_add_host
Date: Sat, 11 Jan 2003 20:33:17 +0100 [thread overview]
Message-ID: <20030111203317.A25836@lst.de> (raw)
We need scsi_add_host sometimes without having a struct device (i.e.
eisa/vlb drivers, ieee1394 storage), so handle that case gracefully.
--- 1.41/drivers/scsi/hosts.c Mon Dec 16 10:59:41 2002
+++ edited/drivers/scsi/hosts.c Sat Jan 11 19:06:56 2003
@@ -314,9 +314,10 @@
**/
int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
{
- dev->class_data = shost;
- shost->host_gendev = dev;
-
+ if (dev) {
+ dev->class_data = shost;
+ shost->host_gendev = dev;
+ }
return __scsi_add_host(shost);
}
next reply other threads:[~2003-01-11 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-11 19:33 Christoph Hellwig [this message]
2003-01-11 22:32 ` [PATCH] allow NULL dev argument to scsi_add_host Willem Riede
2003-01-12 1:17 ` Mike Anderson
2003-01-12 8:06 ` Christoph Hellwig
2003-01-12 19:40 ` Mike Anderson
2003-01-12 23:11 ` Andries Brouwer
2003-01-13 6:50 ` Mike Anderson
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=20030111203317.A25836@lst.de \
--to=hch@lst.de \
--cc=James.Bottomley@steeleye.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox