Commit 37cada68 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] allow NULL dev argument to scsi_add_host

We need scsi_add_host sometimes without having a struct device (i.e.
eisa/vlb drivers, ieee1394 storage), so handle that case gracefully.
parent 9f3097ce
......@@ -315,9 +315,10 @@ int __scsi_add_host(struct Scsi_Host *shost)
**/
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment