public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] allow NULL dev argument to scsi_add_host
@ 2003-01-11 19:33 Christoph Hellwig
  2003-01-11 22:32 ` Willem Riede
  2003-01-12  1:17 ` Mike Anderson
  0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2003-01-11 19:33 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi

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);
 }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-13  6:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-11 19:33 [PATCH] allow NULL dev argument to scsi_add_host Christoph Hellwig
2003-01-11 22:32 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox