scsi: esp_scsi: remove the dev argument to scsi_esp_register

We can simplify use esp->dev now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Christoph Hellwig 2018-10-13 09:26:26 +02:00 committed by Martin K. Petersen
parent 98cda6a2e0
commit 44b1b4d24b
8 changed files with 12 additions and 13 deletions

View File

@ -496,7 +496,7 @@ static int pci_esp_probe_one(struct pci_dev *pdev,
/* Assume 40MHz clock */
esp->cfreq = 40000000;
err = scsi_esp_register(esp, &pdev->dev);
err = scsi_esp_register(esp);
if (err)
goto fail_free_irq;

View File

@ -2382,7 +2382,7 @@ static const char *esp_chip_names[] = {
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;
int err;
@ -2402,10 +2402,10 @@ int scsi_esp_register(struct esp *esp, struct device *dev)
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->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->host->unique_id, esp_chip_names[esp->rev],
esp->cfreq / 1000000, esp->cfact, esp->scsi_id);
@ -2413,7 +2413,7 @@ int scsi_esp_register(struct esp *esp, struct device *dev)
/* Let the SCSI 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)
return err;

View File

@ -568,13 +568,12 @@ struct esp {
* example, the DMA engine has to be reset before ESP can
* be programmed.
* 11) If necessary, call dev_set_drvdata() as needed.
* 12) Call scsi_esp_register() with prepared 'esp' structure
* and a device pointer if possible.
* 12) Call scsi_esp_register() with prepared 'esp' structure.
* 13) Check scsi_esp_register() return value, release all resources
* if an error was returned.
*/
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 irqreturn_t scsi_esp_intr(int, void *);

View File

@ -182,7 +182,7 @@ static int esp_jazz_probe(struct platform_device *dev)
dev_set_drvdata(&dev->dev, esp);
err = scsi_esp_register(esp, &dev->dev);
err = scsi_esp_register(esp);
if (err)
goto fail_free_irq;

View File

@ -576,7 +576,7 @@ static int esp_mac_probe(struct platform_device *dev)
esp_chips[dev->id] = esp;
spin_unlock(&esp_chips_lock);
err = scsi_esp_register(esp, &dev->dev);
err = scsi_esp_register(esp);
if (err)
goto fail_free_irq;

View File

@ -246,7 +246,7 @@ static int esp_sun3x_probe(struct platform_device *dev)
dev_set_drvdata(&dev->dev, esp);
err = scsi_esp_register(esp, &dev->dev);
err = scsi_esp_register(esp);
if (err)
goto fail_free_irq;

View File

@ -529,7 +529,7 @@ static int esp_sbus_probe_one(struct platform_device *op,
dev_set_drvdata(&op->dev, esp);
err = scsi_esp_register(esp, &op->dev);
err = scsi_esp_register(esp);
if (err)
goto fail_free_irq;

View File

@ -1082,7 +1082,7 @@ static int zorro_esp_probe(struct zorro_dev *z,
}
/* register the chip */
err = scsi_esp_register(esp, &z->dev);
err = scsi_esp_register(esp);
if (err) {
err = -ENOMEM;