diff options
Diffstat (limited to 'drivers/block/ps3disk.c')
-rw-r--r-- | drivers/block/ps3disk.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index fdd2d7a00338..34cbb7f3efa8 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
@@ -120,8 +120,7 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev, | |||
120 | static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, | 120 | static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, |
121 | struct request *req) | 121 | struct request *req) |
122 | { | 122 | { |
123 | struct ps3disk_private *priv = | 123 | struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
124 | ps3_system_bus_get_driver_data(&dev->sbd); | ||
125 | int write = rq_data_dir(req), res; | 124 | int write = rq_data_dir(req), res; |
126 | const char *op = write ? "write" : "read"; | 125 | const char *op = write ? "write" : "read"; |
127 | u64 start_sector, sectors; | 126 | u64 start_sector, sectors; |
@@ -169,8 +168,7 @@ static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, | |||
169 | static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, | 168 | static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, |
170 | struct request *req) | 169 | struct request *req) |
171 | { | 170 | { |
172 | struct ps3disk_private *priv = | 171 | struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
173 | ps3_system_bus_get_driver_data(&dev->sbd); | ||
174 | u64 res; | 172 | u64 res; |
175 | 173 | ||
176 | dev_dbg(&dev->sbd.core, "%s:%u: flush request\n", __func__, __LINE__); | 174 | dev_dbg(&dev->sbd.core, "%s:%u: flush request\n", __func__, __LINE__); |
@@ -215,8 +213,7 @@ static void ps3disk_do_request(struct ps3_storage_device *dev, | |||
215 | static void ps3disk_request(struct request_queue *q) | 213 | static void ps3disk_request(struct request_queue *q) |
216 | { | 214 | { |
217 | struct ps3_storage_device *dev = q->queuedata; | 215 | struct ps3_storage_device *dev = q->queuedata; |
218 | struct ps3disk_private *priv = | 216 | struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
219 | ps3_system_bus_get_driver_data(&dev->sbd); | ||
220 | 217 | ||
221 | if (priv->req) { | 218 | if (priv->req) { |
222 | dev_dbg(&dev->sbd.core, "%s:%u busy\n", __func__, __LINE__); | 219 | dev_dbg(&dev->sbd.core, "%s:%u busy\n", __func__, __LINE__); |
@@ -248,7 +245,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data) | |||
248 | return IRQ_HANDLED; | 245 | return IRQ_HANDLED; |
249 | } | 246 | } |
250 | 247 | ||
251 | priv = ps3_system_bus_get_driver_data(&dev->sbd); | 248 | priv = ps3_system_bus_get_drvdata(&dev->sbd); |
252 | req = priv->req; | 249 | req = priv->req; |
253 | if (!req) { | 250 | if (!req) { |
254 | dev_dbg(&dev->sbd.core, | 251 | dev_dbg(&dev->sbd.core, |
@@ -367,8 +364,7 @@ static void ata_id_c_string(const u16 *id, unsigned char *s, unsigned int ofs, | |||
367 | 364 | ||
368 | static int ps3disk_identify(struct ps3_storage_device *dev) | 365 | static int ps3disk_identify(struct ps3_storage_device *dev) |
369 | { | 366 | { |
370 | struct ps3disk_private *priv = | 367 | struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
371 | ps3_system_bus_get_driver_data(&dev->sbd); | ||
372 | struct lv1_ata_cmnd_block ata_cmnd; | 368 | struct lv1_ata_cmnd_block ata_cmnd; |
373 | u16 *id = dev->bounce_buf; | 369 | u16 *id = dev->bounce_buf; |
374 | u64 res; | 370 | u64 res; |
@@ -449,7 +445,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) | |||
449 | goto fail; | 445 | goto fail; |
450 | } | 446 | } |
451 | 447 | ||
452 | ps3_system_bus_set_driver_data(_dev, priv); | 448 | ps3_system_bus_set_drvdata(_dev, priv); |
453 | spin_lock_init(&priv->lock); | 449 | spin_lock_init(&priv->lock); |
454 | 450 | ||
455 | dev->bounce_size = BOUNCE_SIZE; | 451 | dev->bounce_size = BOUNCE_SIZE; |
@@ -527,7 +523,7 @@ fail_free_bounce: | |||
527 | kfree(dev->bounce_buf); | 523 | kfree(dev->bounce_buf); |
528 | fail_free_priv: | 524 | fail_free_priv: |
529 | kfree(priv); | 525 | kfree(priv); |
530 | ps3_system_bus_set_driver_data(_dev, NULL); | 526 | ps3_system_bus_set_drvdata(_dev, NULL); |
531 | fail: | 527 | fail: |
532 | mutex_lock(&ps3disk_mask_mutex); | 528 | mutex_lock(&ps3disk_mask_mutex); |
533 | __clear_bit(devidx, &ps3disk_mask); | 529 | __clear_bit(devidx, &ps3disk_mask); |
@@ -538,8 +534,7 @@ fail: | |||
538 | static int ps3disk_remove(struct ps3_system_bus_device *_dev) | 534 | static int ps3disk_remove(struct ps3_system_bus_device *_dev) |
539 | { | 535 | { |
540 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); | 536 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); |
541 | struct ps3disk_private *priv = | 537 | struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
542 | ps3_system_bus_get_driver_data(&dev->sbd); | ||
543 | 538 | ||
544 | mutex_lock(&ps3disk_mask_mutex); | 539 | mutex_lock(&ps3disk_mask_mutex); |
545 | __clear_bit(MINOR(disk_devt(priv->gendisk)) / PS3DISK_MINORS, | 540 | __clear_bit(MINOR(disk_devt(priv->gendisk)) / PS3DISK_MINORS, |
@@ -553,7 +548,7 @@ static int ps3disk_remove(struct ps3_system_bus_device *_dev) | |||
553 | ps3stor_teardown(dev); | 548 | ps3stor_teardown(dev); |
554 | kfree(dev->bounce_buf); | 549 | kfree(dev->bounce_buf); |
555 | kfree(priv); | 550 | kfree(priv); |
556 | ps3_system_bus_set_driver_data(_dev, NULL); | 551 | ps3_system_bus_set_drvdata(_dev, NULL); |
557 | return 0; | 552 | return 0; |
558 | } | 553 | } |
559 | 554 | ||