aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ps3disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/ps3disk.c')
-rw-r--r--drivers/block/ps3disk.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index aaeeb544228a..34cbb7f3efa8 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -120,7 +120,7 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
120static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, 120static 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 = dev->sbd.core.driver_data; 123 struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd);
124 int write = rq_data_dir(req), res; 124 int write = rq_data_dir(req), res;
125 const char *op = write ? "write" : "read"; 125 const char *op = write ? "write" : "read";
126 u64 start_sector, sectors; 126 u64 start_sector, sectors;
@@ -168,7 +168,7 @@ static int ps3disk_submit_request_sg(struct ps3_storage_device *dev,
168static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, 168static int ps3disk_submit_flush_request(struct ps3_storage_device *dev,
169 struct request *req) 169 struct request *req)
170{ 170{
171 struct ps3disk_private *priv = dev->sbd.core.driver_data; 171 struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd);
172 u64 res; 172 u64 res;
173 173
174 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__);
@@ -213,7 +213,7 @@ static void ps3disk_do_request(struct ps3_storage_device *dev,
213static void ps3disk_request(struct request_queue *q) 213static void ps3disk_request(struct request_queue *q)
214{ 214{
215 struct ps3_storage_device *dev = q->queuedata; 215 struct ps3_storage_device *dev = q->queuedata;
216 struct ps3disk_private *priv = dev->sbd.core.driver_data; 216 struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd);
217 217
218 if (priv->req) { 218 if (priv->req) {
219 dev_dbg(&dev->sbd.core, "%s:%u busy\n", __func__, __LINE__); 219 dev_dbg(&dev->sbd.core, "%s:%u busy\n", __func__, __LINE__);
@@ -245,7 +245,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
245 return IRQ_HANDLED; 245 return IRQ_HANDLED;
246 } 246 }
247 247
248 priv = dev->sbd.core.driver_data; 248 priv = ps3_system_bus_get_drvdata(&dev->sbd);
249 req = priv->req; 249 req = priv->req;
250 if (!req) { 250 if (!req) {
251 dev_dbg(&dev->sbd.core, 251 dev_dbg(&dev->sbd.core,
@@ -364,7 +364,7 @@ static void ata_id_c_string(const u16 *id, unsigned char *s, unsigned int ofs,
364 364
365static int ps3disk_identify(struct ps3_storage_device *dev) 365static int ps3disk_identify(struct ps3_storage_device *dev)
366{ 366{
367 struct ps3disk_private *priv = dev->sbd.core.driver_data; 367 struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd);
368 struct lv1_ata_cmnd_block ata_cmnd; 368 struct lv1_ata_cmnd_block ata_cmnd;
369 u16 *id = dev->bounce_buf; 369 u16 *id = dev->bounce_buf;
370 u64 res; 370 u64 res;
@@ -445,7 +445,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
445 goto fail; 445 goto fail;
446 } 446 }
447 447
448 dev->sbd.core.driver_data = priv; 448 ps3_system_bus_set_drvdata(_dev, priv);
449 spin_lock_init(&priv->lock); 449 spin_lock_init(&priv->lock);
450 450
451 dev->bounce_size = BOUNCE_SIZE; 451 dev->bounce_size = BOUNCE_SIZE;
@@ -523,7 +523,7 @@ fail_free_bounce:
523 kfree(dev->bounce_buf); 523 kfree(dev->bounce_buf);
524fail_free_priv: 524fail_free_priv:
525 kfree(priv); 525 kfree(priv);
526 dev->sbd.core.driver_data = NULL; 526 ps3_system_bus_set_drvdata(_dev, NULL);
527fail: 527fail:
528 mutex_lock(&ps3disk_mask_mutex); 528 mutex_lock(&ps3disk_mask_mutex);
529 __clear_bit(devidx, &ps3disk_mask); 529 __clear_bit(devidx, &ps3disk_mask);
@@ -534,7 +534,7 @@ fail:
534static int ps3disk_remove(struct ps3_system_bus_device *_dev) 534static int ps3disk_remove(struct ps3_system_bus_device *_dev)
535{ 535{
536 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); 536 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
537 struct ps3disk_private *priv = dev->sbd.core.driver_data; 537 struct ps3disk_private *priv = ps3_system_bus_get_drvdata(&dev->sbd);
538 538
539 mutex_lock(&ps3disk_mask_mutex); 539 mutex_lock(&ps3disk_mask_mutex);
540 __clear_bit(MINOR(disk_devt(priv->gendisk)) / PS3DISK_MINORS, 540 __clear_bit(MINOR(disk_devt(priv->gendisk)) / PS3DISK_MINORS,
@@ -548,7 +548,7 @@ static int ps3disk_remove(struct ps3_system_bus_device *_dev)
548 ps3stor_teardown(dev); 548 ps3stor_teardown(dev);
549 kfree(dev->bounce_buf); 549 kfree(dev->bounce_buf);
550 kfree(priv); 550 kfree(priv);
551 dev->sbd.core.driver_data = NULL; 551 ps3_system_bus_set_drvdata(_dev, NULL);
552 return 0; 552 return 0;
553} 553}
554 554