Skip to content

Commit

Permalink
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
Browse files Browse the repository at this point in the history
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Geert Uytterhoeven authored and Benjamin Herrenschmidt committed Jun 16, 2009
1 parent ba55bd7 commit c4b512b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/scsi/ps3rom.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data)
return IRQ_HANDLED;
}

host = dev->sbd.core.driver_data;
host = ps3_system_bus_get_drvdata(&dev->sbd);
priv = shost_priv(host);
cmd = priv->curr_cmd;

Expand Down Expand Up @@ -387,7 +387,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)
}

priv = shost_priv(host);
dev->sbd.core.driver_data = host;
ps3_system_bus_set_drvdata(&dev->sbd, host);
priv->dev = dev;

/* One device/LUN per SCSI bus */
Expand All @@ -407,7 +407,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)

fail_host_put:
scsi_host_put(host);
dev->sbd.core.driver_data = NULL;
ps3_system_bus_set_drvdata(&dev->sbd, NULL);
fail_teardown:
ps3stor_teardown(dev);
fail_free_bounce:
Expand All @@ -418,12 +418,12 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)
static int ps3rom_remove(struct ps3_system_bus_device *_dev)
{
struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
struct Scsi_Host *host = dev->sbd.core.driver_data;
struct Scsi_Host *host = ps3_system_bus_get_drvdata(&dev->sbd);

scsi_remove_host(host);
ps3stor_teardown(dev);
scsi_host_put(host);
dev->sbd.core.driver_data = NULL;
ps3_system_bus_set_drvdata(&dev->sbd, NULL);
kfree(dev->bounce_buf);
return 0;
}
Expand Down

0 comments on commit c4b512b

Please sign in to comment.