aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ps3disk.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 00:38:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-15 02:47:24 -0400
commit03fa68c245cccbcb99035cbabaa13b408ba91ab5 (patch)
treeb6190d60db6302fd9b84c3aac50bf75b7351f70c /drivers/block/ps3disk.c
parent9f08e9db84c1e9234e07b9b595f5b2508c621823 (diff)
ps3: shorten ps3_system_bus_[gs]et_driver_data to ps3_system_bus_[gs]et_drvdata
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Jim Paris <jim@jtan.com> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/block/ps3disk.c')
-rw-r--r--drivers/block/ps3disk.c23
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,
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 = 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,
169static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, 168static 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,
215static void ps3disk_request(struct request_queue *q) 213static 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
368static int ps3disk_identify(struct ps3_storage_device *dev) 365static 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);
528fail_free_priv: 524fail_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);
531fail: 527fail:
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:
538static int ps3disk_remove(struct ps3_system_bus_device *_dev) 534static 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