aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/powerpc/include/asm/ps3.h4
-rw-r--r--drivers/block/ps3disk.c23
-rw-r--r--drivers/block/ps3vram.c48
-rw-r--r--drivers/net/ps3_gelic_net.c8
-rw-r--r--drivers/usb/host/ehci-ps3.c7
-rw-r--r--drivers/usb/host/ohci-ps3.c7
6 files changed, 45 insertions, 52 deletions
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index dcd302f489f6..7660694ab3ca 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -418,12 +418,12 @@ static inline struct ps3_system_bus_driver *
418 * @data: Data to set 418 * @data: Data to set
419 */ 419 */
420 420
421static inline void ps3_system_bus_set_driver_data( 421static inline void ps3_system_bus_set_drvdata(
422 struct ps3_system_bus_device *dev, void *data) 422 struct ps3_system_bus_device *dev, void *data)
423{ 423{
424 dev_set_drvdata(&dev->core, data); 424 dev_set_drvdata(&dev->core, data);
425} 425}
426static inline void *ps3_system_bus_get_driver_data( 426static inline void *ps3_system_bus_get_drvdata(
427 struct ps3_system_bus_device *dev) 427 struct ps3_system_bus_device *dev)
428{ 428{
429 return dev_get_drvdata(&dev->core); 429 return dev_get_drvdata(&dev->core);
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
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index fcecc7f897e4..095f97e60665 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -110,7 +110,7 @@ static u32 *ps3vram_get_notifier(void *reports, int notifier)
110 110
111static void ps3vram_notifier_reset(struct ps3_system_bus_device *dev) 111static void ps3vram_notifier_reset(struct ps3_system_bus_device *dev)
112{ 112{
113 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 113 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
114 u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); 114 u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
115 int i; 115 int i;
116 116
@@ -121,7 +121,7 @@ static void ps3vram_notifier_reset(struct ps3_system_bus_device *dev)
121static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev, 121static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev,
122 unsigned int timeout_ms) 122 unsigned int timeout_ms)
123{ 123{
124 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 124 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
125 u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); 125 u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
126 unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); 126 unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
127 127
@@ -136,7 +136,7 @@ static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev,
136 136
137static void ps3vram_init_ring(struct ps3_system_bus_device *dev) 137static void ps3vram_init_ring(struct ps3_system_bus_device *dev)
138{ 138{
139 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 139 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
140 140
141 priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; 141 priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET;
142 priv->ctrl[CTRL_GET] = FIFO_BASE + FIFO_OFFSET; 142 priv->ctrl[CTRL_GET] = FIFO_BASE + FIFO_OFFSET;
@@ -145,7 +145,7 @@ static void ps3vram_init_ring(struct ps3_system_bus_device *dev)
145static int ps3vram_wait_ring(struct ps3_system_bus_device *dev, 145static int ps3vram_wait_ring(struct ps3_system_bus_device *dev,
146 unsigned int timeout_ms) 146 unsigned int timeout_ms)
147{ 147{
148 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 148 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
149 unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); 149 unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
150 150
151 do { 151 do {
@@ -174,7 +174,7 @@ static void ps3vram_begin_ring(struct ps3vram_priv *priv, u32 chan, u32 tag,
174 174
175static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev) 175static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev)
176{ 176{
177 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 177 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
178 int status; 178 int status;
179 179
180 ps3vram_out_ring(priv, 0x20000000 | (FIFO_BASE + FIFO_OFFSET)); 180 ps3vram_out_ring(priv, 0x20000000 | (FIFO_BASE + FIFO_OFFSET));
@@ -192,7 +192,7 @@ static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev)
192 192
193static void ps3vram_fire_ring(struct ps3_system_bus_device *dev) 193static void ps3vram_fire_ring(struct ps3_system_bus_device *dev)
194{ 194{
195 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 195 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
196 int status; 196 int status;
197 197
198 mutex_lock(&ps3_gpu_mutex); 198 mutex_lock(&ps3_gpu_mutex);
@@ -218,7 +218,7 @@ static void ps3vram_fire_ring(struct ps3_system_bus_device *dev)
218 218
219static void ps3vram_bind(struct ps3_system_bus_device *dev) 219static void ps3vram_bind(struct ps3_system_bus_device *dev)
220{ 220{
221 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 221 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
222 222
223 ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0, 1); 223 ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0, 1);
224 ps3vram_out_ring(priv, 0x31337303); 224 ps3vram_out_ring(priv, 0x31337303);
@@ -241,7 +241,7 @@ static int ps3vram_upload(struct ps3_system_bus_device *dev,
241 unsigned int src_offset, unsigned int dst_offset, 241 unsigned int src_offset, unsigned int dst_offset,
242 int len, int count) 242 int len, int count)
243{ 243{
244 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 244 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
245 245
246 ps3vram_begin_ring(priv, UPLOAD_SUBCH, 246 ps3vram_begin_ring(priv, UPLOAD_SUBCH,
247 NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); 247 NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
@@ -273,7 +273,7 @@ static int ps3vram_download(struct ps3_system_bus_device *dev,
273 unsigned int src_offset, unsigned int dst_offset, 273 unsigned int src_offset, unsigned int dst_offset,
274 int len, int count) 274 int len, int count)
275{ 275{
276 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 276 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
277 277
278 ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 278 ps3vram_begin_ring(priv, DOWNLOAD_SUBCH,
279 NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); 279 NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
@@ -303,7 +303,7 @@ static int ps3vram_download(struct ps3_system_bus_device *dev,
303 303
304static void ps3vram_cache_evict(struct ps3_system_bus_device *dev, int entry) 304static void ps3vram_cache_evict(struct ps3_system_bus_device *dev, int entry)
305{ 305{
306 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 306 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
307 struct ps3vram_cache *cache = &priv->cache; 307 struct ps3vram_cache *cache = &priv->cache;
308 308
309 if (!(cache->tags[entry].flags & CACHE_PAGE_DIRTY)) 309 if (!(cache->tags[entry].flags & CACHE_PAGE_DIRTY))
@@ -325,7 +325,7 @@ static void ps3vram_cache_evict(struct ps3_system_bus_device *dev, int entry)
325static void ps3vram_cache_load(struct ps3_system_bus_device *dev, int entry, 325static void ps3vram_cache_load(struct ps3_system_bus_device *dev, int entry,
326 unsigned int address) 326 unsigned int address)
327{ 327{
328 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 328 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
329 struct ps3vram_cache *cache = &priv->cache; 329 struct ps3vram_cache *cache = &priv->cache;
330 330
331 dev_dbg(&dev->core, "Fetching %d: 0x%08x\n", entry, address); 331 dev_dbg(&dev->core, "Fetching %d: 0x%08x\n", entry, address);
@@ -345,7 +345,7 @@ static void ps3vram_cache_load(struct ps3_system_bus_device *dev, int entry,
345 345
346static void ps3vram_cache_flush(struct ps3_system_bus_device *dev) 346static void ps3vram_cache_flush(struct ps3_system_bus_device *dev)
347{ 347{
348 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 348 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
349 struct ps3vram_cache *cache = &priv->cache; 349 struct ps3vram_cache *cache = &priv->cache;
350 int i; 350 int i;
351 351
@@ -359,7 +359,7 @@ static void ps3vram_cache_flush(struct ps3_system_bus_device *dev)
359static unsigned int ps3vram_cache_match(struct ps3_system_bus_device *dev, 359static unsigned int ps3vram_cache_match(struct ps3_system_bus_device *dev,
360 loff_t address) 360 loff_t address)
361{ 361{
362 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 362 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
363 struct ps3vram_cache *cache = &priv->cache; 363 struct ps3vram_cache *cache = &priv->cache;
364 unsigned int base; 364 unsigned int base;
365 unsigned int offset; 365 unsigned int offset;
@@ -393,7 +393,7 @@ static unsigned int ps3vram_cache_match(struct ps3_system_bus_device *dev,
393 393
394static int ps3vram_cache_init(struct ps3_system_bus_device *dev) 394static int ps3vram_cache_init(struct ps3_system_bus_device *dev)
395{ 395{
396 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 396 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
397 397
398 priv->cache.page_count = CACHE_PAGE_COUNT; 398 priv->cache.page_count = CACHE_PAGE_COUNT;
399 priv->cache.page_size = CACHE_PAGE_SIZE; 399 priv->cache.page_size = CACHE_PAGE_SIZE;
@@ -412,7 +412,7 @@ static int ps3vram_cache_init(struct ps3_system_bus_device *dev)
412 412
413static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev) 413static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev)
414{ 414{
415 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 415 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
416 416
417 ps3vram_cache_flush(dev); 417 ps3vram_cache_flush(dev);
418 kfree(priv->cache.tags); 418 kfree(priv->cache.tags);
@@ -421,7 +421,7 @@ static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev)
421static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, 421static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from,
422 size_t len, size_t *retlen, u_char *buf) 422 size_t len, size_t *retlen, u_char *buf)
423{ 423{
424 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 424 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
425 unsigned int cached, count; 425 unsigned int cached, count;
426 426
427 dev_dbg(&dev->core, "%s: from=0x%08x len=0x%zx\n", __func__, 427 dev_dbg(&dev->core, "%s: from=0x%08x len=0x%zx\n", __func__,
@@ -465,7 +465,7 @@ static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from,
465static int ps3vram_write(struct ps3_system_bus_device *dev, loff_t to, 465static int ps3vram_write(struct ps3_system_bus_device *dev, loff_t to,
466 size_t len, size_t *retlen, const u_char *buf) 466 size_t len, size_t *retlen, const u_char *buf)
467{ 467{
468 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 468 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
469 unsigned int cached, count; 469 unsigned int cached, count;
470 470
471 if (to >= priv->size) 471 if (to >= priv->size)
@@ -528,7 +528,7 @@ static const struct file_operations ps3vram_proc_fops = {
528 528
529static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) 529static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev)
530{ 530{
531 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 531 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
532 struct proc_dir_entry *pde; 532 struct proc_dir_entry *pde;
533 533
534 pde = proc_create_data(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops, 534 pde = proc_create_data(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops,
@@ -540,7 +540,7 @@ static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev)
540static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev, 540static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev,
541 struct bio *bio) 541 struct bio *bio)
542{ 542{
543 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 543 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
544 int write = bio_data_dir(bio) == WRITE; 544 int write = bio_data_dir(bio) == WRITE;
545 const char *op = write ? "write" : "read"; 545 const char *op = write ? "write" : "read";
546 loff_t offset = bio->bi_sector << 9; 546 loff_t offset = bio->bi_sector << 9;
@@ -590,7 +590,7 @@ out:
590static int ps3vram_make_request(struct request_queue *q, struct bio *bio) 590static int ps3vram_make_request(struct request_queue *q, struct bio *bio)
591{ 591{
592 struct ps3_system_bus_device *dev = q->queuedata; 592 struct ps3_system_bus_device *dev = q->queuedata;
593 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 593 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
594 int busy; 594 int busy;
595 595
596 dev_dbg(&dev->core, "%s\n", __func__); 596 dev_dbg(&dev->core, "%s\n", __func__);
@@ -628,7 +628,7 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
628 628
629 spin_lock_init(&priv->lock); 629 spin_lock_init(&priv->lock);
630 bio_list_init(&priv->list); 630 bio_list_init(&priv->list);
631 ps3_system_bus_set_driver_data(dev, priv); 631 ps3_system_bus_set_drvdata(dev, priv);
632 632
633 /* Allocate XDR buffer (1MiB aligned) */ 633 /* Allocate XDR buffer (1MiB aligned) */
634 priv->xdr_buf = (void *)__get_free_pages(GFP_KERNEL, 634 priv->xdr_buf = (void *)__get_free_pages(GFP_KERNEL,
@@ -793,14 +793,14 @@ out_free_xdr_buf:
793 free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); 793 free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE));
794fail_free_priv: 794fail_free_priv:
795 kfree(priv); 795 kfree(priv);
796 ps3_system_bus_set_driver_data(dev, NULL); 796 ps3_system_bus_set_drvdata(dev, NULL);
797fail: 797fail:
798 return error; 798 return error;
799} 799}
800 800
801static int ps3vram_remove(struct ps3_system_bus_device *dev) 801static int ps3vram_remove(struct ps3_system_bus_device *dev)
802{ 802{
803 struct ps3vram_priv *priv = ps3_system_bus_get_driver_data(dev); 803 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
804 804
805 del_gendisk(priv->gendisk); 805 del_gendisk(priv->gendisk);
806 put_disk(priv->gendisk); 806 put_disk(priv->gendisk);
@@ -817,7 +817,7 @@ static int ps3vram_remove(struct ps3_system_bus_device *dev)
817 ps3_close_hv_device(dev); 817 ps3_close_hv_device(dev);
818 free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); 818 free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE));
819 kfree(priv); 819 kfree(priv);
820 ps3_system_bus_set_driver_data(dev, NULL); 820 ps3_system_bus_set_drvdata(dev, NULL);
821 return 0; 821 return 0;
822} 822}
823 823
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 30900b30d532..2b38f39924a6 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1648,7 +1648,7 @@ static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
1648 result = -ENOMEM; 1648 result = -ENOMEM;
1649 goto fail_alloc_card; 1649 goto fail_alloc_card;
1650 } 1650 }
1651 ps3_system_bus_set_driver_data(dev, card); 1651 ps3_system_bus_set_drvdata(dev, card);
1652 card->dev = dev; 1652 card->dev = dev;
1653 1653
1654 /* get internal vlan info */ 1654 /* get internal vlan info */
@@ -1749,7 +1749,7 @@ fail_alloc_irq:
1749 bus_id(card), 1749 bus_id(card),
1750 0, 0); 1750 0, 0);
1751fail_status_indicator: 1751fail_status_indicator:
1752 ps3_system_bus_set_driver_data(dev, NULL); 1752 ps3_system_bus_set_drvdata(dev, NULL);
1753 kfree(netdev_card(netdev)->unalign); 1753 kfree(netdev_card(netdev)->unalign);
1754 free_netdev(netdev); 1754 free_netdev(netdev);
1755fail_alloc_card: 1755fail_alloc_card:
@@ -1766,7 +1766,7 @@ fail_open:
1766 1766
1767static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev) 1767static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
1768{ 1768{
1769 struct gelic_card *card = ps3_system_bus_get_driver_data(dev); 1769 struct gelic_card *card = ps3_system_bus_get_drvdata(dev);
1770 struct net_device *netdev0; 1770 struct net_device *netdev0;
1771 pr_debug("%s: called\n", __func__); 1771 pr_debug("%s: called\n", __func__);
1772 1772
@@ -1803,7 +1803,7 @@ static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
1803 kfree(netdev_card(netdev0)->unalign); 1803 kfree(netdev_card(netdev0)->unalign);
1804 free_netdev(netdev0); 1804 free_netdev(netdev0);
1805 1805
1806 ps3_system_bus_set_driver_data(dev, NULL); 1806 ps3_system_bus_set_drvdata(dev, NULL);
1807 1807
1808 ps3_dma_region_free(dev->d_region); 1808 ps3_dma_region_free(dev->d_region);
1809 1809
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 1ba9f9a8c308..bb870b8f81bc 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -162,7 +162,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
162 dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__, 162 dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
163 (unsigned long)virq); 163 (unsigned long)virq);
164 164
165 ps3_system_bus_set_driver_data(dev, hcd); 165 ps3_system_bus_set_drvdata(dev, hcd);
166 166
167 result = usb_add_hcd(hcd, virq, IRQF_DISABLED); 167 result = usb_add_hcd(hcd, virq, IRQF_DISABLED);
168 168
@@ -195,8 +195,7 @@ fail_start:
195static int ps3_ehci_remove(struct ps3_system_bus_device *dev) 195static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
196{ 196{
197 unsigned int tmp; 197 unsigned int tmp;
198 struct usb_hcd *hcd = 198 struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev);
199 (struct usb_hcd *)ps3_system_bus_get_driver_data(dev);
200 199
201 BUG_ON(!hcd); 200 BUG_ON(!hcd);
202 201
@@ -208,7 +207,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
208 ehci_shutdown(hcd); 207 ehci_shutdown(hcd);
209 usb_remove_hcd(hcd); 208 usb_remove_hcd(hcd);
210 209
211 ps3_system_bus_set_driver_data(dev, NULL); 210 ps3_system_bus_set_drvdata(dev, NULL);
212 211
213 BUG_ON(!hcd->regs); 212 BUG_ON(!hcd->regs);
214 iounmap(hcd->regs); 213 iounmap(hcd->regs);
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index 3d1910317328..1d56259c5db1 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -162,7 +162,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
162 dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__, 162 dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
163 (unsigned long)virq); 163 (unsigned long)virq);
164 164
165 ps3_system_bus_set_driver_data(dev, hcd); 165 ps3_system_bus_set_drvdata(dev, hcd);
166 166
167 result = usb_add_hcd(hcd, virq, IRQF_DISABLED); 167 result = usb_add_hcd(hcd, virq, IRQF_DISABLED);
168 168
@@ -195,8 +195,7 @@ fail_start:
195static int ps3_ohci_remove(struct ps3_system_bus_device *dev) 195static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
196{ 196{
197 unsigned int tmp; 197 unsigned int tmp;
198 struct usb_hcd *hcd = 198 struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev);
199 (struct usb_hcd *)ps3_system_bus_get_driver_data(dev);
200 199
201 BUG_ON(!hcd); 200 BUG_ON(!hcd);
202 201
@@ -208,7 +207,7 @@ static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
208 ohci_shutdown(hcd); 207 ohci_shutdown(hcd);
209 usb_remove_hcd(hcd); 208 usb_remove_hcd(hcd);
210 209
211 ps3_system_bus_set_driver_data(dev, NULL); 210 ps3_system_bus_set_drvdata(dev, NULL);
212 211
213 BUG_ON(!hcd->regs); 212 BUG_ON(!hcd->regs);
214 iounmap(hcd->regs); 213 iounmap(hcd->regs);