X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fbvme6000_scsi.c;h=d858f3d412744583d320202ac44bbb12bd6cece5;hb=b93c35ff39d19f20c47c06c206986afefecc777a;hp=012cdea7946d3dd8f98f8aa49b1dd122bbfd4387;hpb=2e85622042cb5fd56a606e884651ffde52f21028;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c index 012cdea7946..d858f3d4127 100644 --- a/drivers/scsi/bvme6000_scsi.c +++ b/drivers/scsi/bvme6000_scsi.c @@ -36,19 +36,18 @@ static struct platform_device *bvme6000_scsi_device; static __devinit int bvme6000_probe(struct device *dev) { - struct Scsi_Host * host = NULL; + struct Scsi_Host *host; struct NCR_700_Host_Parameters *hostdata; if (!MACH_IS_BVME6000) goto out; - hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); - if (hostdata == NULL) { + hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); + if (!hostdata) { printk(KERN_ERR "bvme6000-scsi: " "Failed to allocate host data\n"); goto out; } - memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); /* Fill in the required pieces of hostdata */ hostdata->base = (void __iomem *)BVME_NCR53C710_BASE; @@ -74,6 +73,7 @@ bvme6000_probe(struct device *dev) goto out_put_host; } + dev_set_drvdata(dev, host); scsi_scan_host(host); return 0; @@ -89,7 +89,7 @@ bvme6000_probe(struct device *dev) static __devexit int bvme6000_device_remove(struct device *dev) { - struct Scsi_Host *host = dev_to_shost(dev); + struct Scsi_Host *host = dev_get_drvdata(dev); struct NCR_700_Host_Parameters *hostdata = shost_priv(host); scsi_remove_host(host);