Commit 44b1b4d2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: esp_scsi: remove the dev argument to scsi_esp_register

We can simplify use esp->dev now.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 98cda6a2
...@@ -496,7 +496,7 @@ static int pci_esp_probe_one(struct pci_dev *pdev, ...@@ -496,7 +496,7 @@ static int pci_esp_probe_one(struct pci_dev *pdev,
/* Assume 40MHz clock */ /* Assume 40MHz clock */
esp->cfreq = 40000000; esp->cfreq = 40000000;
err = scsi_esp_register(esp, &pdev->dev); err = scsi_esp_register(esp);
if (err) if (err)
goto fail_free_irq; goto fail_free_irq;
......
...@@ -2382,7 +2382,7 @@ static const char *esp_chip_names[] = { ...@@ -2382,7 +2382,7 @@ static const char *esp_chip_names[] = {
static struct scsi_transport_template *esp_transport_template; static struct scsi_transport_template *esp_transport_template;
int scsi_esp_register(struct esp *esp, struct device *dev) int scsi_esp_register(struct esp *esp)
{ {
static int instance; static int instance;
int err; int err;
...@@ -2402,10 +2402,10 @@ int scsi_esp_register(struct esp *esp, struct device *dev) ...@@ -2402,10 +2402,10 @@ int scsi_esp_register(struct esp *esp, struct device *dev)
esp_bootup_reset(esp); esp_bootup_reset(esp);
dev_printk(KERN_INFO, dev, "esp%u: regs[%1p:%1p] irq[%u]\n", dev_printk(KERN_INFO, esp->dev, "esp%u: regs[%1p:%1p] irq[%u]\n",
esp->host->unique_id, esp->regs, esp->dma_regs, esp->host->unique_id, esp->regs, esp->dma_regs,
esp->host->irq); esp->host->irq);
dev_printk(KERN_INFO, dev, dev_printk(KERN_INFO, esp->dev,
"esp%u: is a %s, %u MHz (ccf=%u), SCSI ID %u\n", "esp%u: is a %s, %u MHz (ccf=%u), SCSI ID %u\n",
esp->host->unique_id, esp_chip_names[esp->rev], esp->host->unique_id, esp_chip_names[esp->rev],
esp->cfreq / 1000000, esp->cfact, esp->scsi_id); esp->cfreq / 1000000, esp->cfact, esp->scsi_id);
...@@ -2413,7 +2413,7 @@ int scsi_esp_register(struct esp *esp, struct device *dev) ...@@ -2413,7 +2413,7 @@ int scsi_esp_register(struct esp *esp, struct device *dev)
/* Let the SCSI bus reset settle. */ /* Let the SCSI bus reset settle. */
ssleep(esp_bus_reset_settle); ssleep(esp_bus_reset_settle);
err = scsi_add_host(esp->host, dev); err = scsi_add_host(esp->host, esp->dev);
if (err) if (err)
return err; return err;
......
...@@ -568,13 +568,12 @@ struct esp { ...@@ -568,13 +568,12 @@ struct esp {
* example, the DMA engine has to be reset before ESP can * example, the DMA engine has to be reset before ESP can
* be programmed. * be programmed.
* 11) If necessary, call dev_set_drvdata() as needed. * 11) If necessary, call dev_set_drvdata() as needed.
* 12) Call scsi_esp_register() with prepared 'esp' structure * 12) Call scsi_esp_register() with prepared 'esp' structure.
* and a device pointer if possible.
* 13) Check scsi_esp_register() return value, release all resources * 13) Check scsi_esp_register() return value, release all resources
* if an error was returned. * if an error was returned.
*/ */
extern struct scsi_host_template scsi_esp_template; extern struct scsi_host_template scsi_esp_template;
extern int scsi_esp_register(struct esp *, struct device *); extern int scsi_esp_register(struct esp *);
extern void scsi_esp_unregister(struct esp *); extern void scsi_esp_unregister(struct esp *);
extern irqreturn_t scsi_esp_intr(int, void *); extern irqreturn_t scsi_esp_intr(int, void *);
......
...@@ -182,7 +182,7 @@ static int esp_jazz_probe(struct platform_device *dev) ...@@ -182,7 +182,7 @@ static int esp_jazz_probe(struct platform_device *dev)
dev_set_drvdata(&dev->dev, esp); dev_set_drvdata(&dev->dev, esp);
err = scsi_esp_register(esp, &dev->dev); err = scsi_esp_register(esp);
if (err) if (err)
goto fail_free_irq; goto fail_free_irq;
......
...@@ -576,7 +576,7 @@ static int esp_mac_probe(struct platform_device *dev) ...@@ -576,7 +576,7 @@ static int esp_mac_probe(struct platform_device *dev)
esp_chips[dev->id] = esp; esp_chips[dev->id] = esp;
spin_unlock(&esp_chips_lock); spin_unlock(&esp_chips_lock);
err = scsi_esp_register(esp, &dev->dev); err = scsi_esp_register(esp);
if (err) if (err)
goto fail_free_irq; goto fail_free_irq;
......
...@@ -246,7 +246,7 @@ static int esp_sun3x_probe(struct platform_device *dev) ...@@ -246,7 +246,7 @@ static int esp_sun3x_probe(struct platform_device *dev)
dev_set_drvdata(&dev->dev, esp); dev_set_drvdata(&dev->dev, esp);
err = scsi_esp_register(esp, &dev->dev); err = scsi_esp_register(esp);
if (err) if (err)
goto fail_free_irq; goto fail_free_irq;
......
...@@ -529,7 +529,7 @@ static int esp_sbus_probe_one(struct platform_device *op, ...@@ -529,7 +529,7 @@ static int esp_sbus_probe_one(struct platform_device *op,
dev_set_drvdata(&op->dev, esp); dev_set_drvdata(&op->dev, esp);
err = scsi_esp_register(esp, &op->dev); err = scsi_esp_register(esp);
if (err) if (err)
goto fail_free_irq; goto fail_free_irq;
......
...@@ -1082,7 +1082,7 @@ static int zorro_esp_probe(struct zorro_dev *z, ...@@ -1082,7 +1082,7 @@ static int zorro_esp_probe(struct zorro_dev *z,
} }
/* register the chip */ /* register the chip */
err = scsi_esp_register(esp, &z->dev); err = scsi_esp_register(esp);
if (err) { if (err) {
err = -ENOMEM; err = -ENOMEM;
......
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