Commit c4b512bc832c6c6aab14acb2bd96940e867e5018
Committed by
Benjamin Herrenschmidt
1 parent
ba55bd7436
Exists in
master
and in
39 other branches
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
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>
Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff
drivers/scsi/ps3rom.c
... | ... | @@ -299,7 +299,7 @@ |
299 | 299 | return IRQ_HANDLED; |
300 | 300 | } |
301 | 301 | |
302 | - host = dev->sbd.core.driver_data; | |
302 | + host = ps3_system_bus_get_drvdata(&dev->sbd); | |
303 | 303 | priv = shost_priv(host); |
304 | 304 | cmd = priv->curr_cmd; |
305 | 305 | |
... | ... | @@ -387,7 +387,7 @@ |
387 | 387 | } |
388 | 388 | |
389 | 389 | priv = shost_priv(host); |
390 | - dev->sbd.core.driver_data = host; | |
390 | + ps3_system_bus_set_drvdata(&dev->sbd, host); | |
391 | 391 | priv->dev = dev; |
392 | 392 | |
393 | 393 | /* One device/LUN per SCSI bus */ |
... | ... | @@ -407,7 +407,7 @@ |
407 | 407 | |
408 | 408 | fail_host_put: |
409 | 409 | scsi_host_put(host); |
410 | - dev->sbd.core.driver_data = NULL; | |
410 | + ps3_system_bus_set_drvdata(&dev->sbd, NULL); | |
411 | 411 | fail_teardown: |
412 | 412 | ps3stor_teardown(dev); |
413 | 413 | fail_free_bounce: |
414 | 414 | |
... | ... | @@ -418,12 +418,12 @@ |
418 | 418 | static int ps3rom_remove(struct ps3_system_bus_device *_dev) |
419 | 419 | { |
420 | 420 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); |
421 | - struct Scsi_Host *host = dev->sbd.core.driver_data; | |
421 | + struct Scsi_Host *host = ps3_system_bus_get_drvdata(&dev->sbd); | |
422 | 422 | |
423 | 423 | scsi_remove_host(host); |
424 | 424 | ps3stor_teardown(dev); |
425 | 425 | scsi_host_put(host); |
426 | - dev->sbd.core.driver_data = NULL; | |
426 | + ps3_system_bus_set_drvdata(&dev->sbd, NULL); | |
427 | 427 | kfree(dev->bounce_buf); |
428 | 428 | return 0; |
429 | 429 | } |