diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-04 13:02:56 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-15 23:53:38 -0500 |
commit | aab0d375e01d8c16e7e5b9bd915dfaa0a815418f (patch) | |
tree | 982e3a102ea1ffb6fb5c2f265dcaece3f6cc05cb /arch/powerpc/platforms/ps3 | |
parent | f63837f0581fe580168ae1a7d178ded935411747 (diff) |
powerpc: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3')
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index d3da1e6e73bc..ee0d22911621 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "platform.h" | 31 | #include "platform.h" |
32 | 32 | ||
33 | static struct device ps3_system_bus = { | 33 | static struct device ps3_system_bus = { |
34 | .bus_id = "ps3_system", | 34 | .init_name = "ps3_system", |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* FIXME: need device usage counters! */ | 37 | /* FIXME: need device usage counters! */ |
@@ -356,12 +356,12 @@ static int ps3_system_bus_match(struct device *_dev, | |||
356 | if (result) | 356 | if (result) |
357 | pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n", | 357 | pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n", |
358 | __func__, __LINE__, | 358 | __func__, __LINE__, |
359 | dev->match_id, dev->match_sub_id, dev->core.bus_id, | 359 | dev->match_id, dev->match_sub_id, dev_name(&dev->core), |
360 | drv->match_id, drv->match_sub_id, drv->core.name); | 360 | drv->match_id, drv->match_sub_id, drv->core.name); |
361 | else | 361 | else |
362 | pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n", | 362 | pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n", |
363 | __func__, __LINE__, | 363 | __func__, __LINE__, |
364 | dev->match_id, dev->match_sub_id, dev->core.bus_id, | 364 | dev->match_id, dev->match_sub_id, dev_name(&dev->core), |
365 | drv->match_id, drv->match_sub_id, drv->core.name); | 365 | drv->match_id, drv->match_sub_id, drv->core.name); |
366 | 366 | ||
367 | return result; | 367 | return result; |
@@ -383,9 +383,9 @@ static int ps3_system_bus_probe(struct device *_dev) | |||
383 | result = drv->probe(dev); | 383 | result = drv->probe(dev); |
384 | else | 384 | else |
385 | pr_debug("%s:%d: %s no probe method\n", __func__, __LINE__, | 385 | pr_debug("%s:%d: %s no probe method\n", __func__, __LINE__, |
386 | dev->core.bus_id); | 386 | dev_name(&dev->core)); |
387 | 387 | ||
388 | pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id); | 388 | pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core)); |
389 | return result; | 389 | return result; |
390 | } | 390 | } |
391 | 391 | ||
@@ -407,7 +407,7 @@ static int ps3_system_bus_remove(struct device *_dev) | |||
407 | dev_dbg(&dev->core, "%s:%d %s: no remove method\n", | 407 | dev_dbg(&dev->core, "%s:%d %s: no remove method\n", |
408 | __func__, __LINE__, drv->core.name); | 408 | __func__, __LINE__, drv->core.name); |
409 | 409 | ||
410 | pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id); | 410 | pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core)); |
411 | return result; | 411 | return result; |
412 | } | 412 | } |
413 | 413 | ||
@@ -432,7 +432,7 @@ static void ps3_system_bus_shutdown(struct device *_dev) | |||
432 | BUG_ON(!drv); | 432 | BUG_ON(!drv); |
433 | 433 | ||
434 | dev_dbg(&dev->core, "%s:%d: %s -> %s\n", __func__, __LINE__, | 434 | dev_dbg(&dev->core, "%s:%d: %s -> %s\n", __func__, __LINE__, |
435 | dev->core.bus_id, drv->core.name); | 435 | dev_name(&dev->core), drv->core.name); |
436 | 436 | ||
437 | if (drv->shutdown) | 437 | if (drv->shutdown) |
438 | drv->shutdown(dev); | 438 | drv->shutdown(dev); |
@@ -744,22 +744,18 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) | |||
744 | switch (dev->dev_type) { | 744 | switch (dev->dev_type) { |
745 | case PS3_DEVICE_TYPE_IOC0: | 745 | case PS3_DEVICE_TYPE_IOC0: |
746 | dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops; | 746 | dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops; |
747 | snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), | 747 | dev_set_name(&dev->core, "ioc0_%02x", ++dev_ioc0_count); |
748 | "ioc0_%02x", ++dev_ioc0_count); | ||
749 | break; | 748 | break; |
750 | case PS3_DEVICE_TYPE_SB: | 749 | case PS3_DEVICE_TYPE_SB: |
751 | dev->core.archdata.dma_ops = &ps3_sb_dma_ops; | 750 | dev->core.archdata.dma_ops = &ps3_sb_dma_ops; |
752 | snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), | 751 | dev_set_name(&dev->core, "sb_%02x", ++dev_sb_count); |
753 | "sb_%02x", ++dev_sb_count); | ||
754 | 752 | ||
755 | break; | 753 | break; |
756 | case PS3_DEVICE_TYPE_VUART: | 754 | case PS3_DEVICE_TYPE_VUART: |
757 | snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), | 755 | dev_set_name(&dev->core, "vuart_%02x", ++dev_vuart_count); |
758 | "vuart_%02x", ++dev_vuart_count); | ||
759 | break; | 756 | break; |
760 | case PS3_DEVICE_TYPE_LPM: | 757 | case PS3_DEVICE_TYPE_LPM: |
761 | snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), | 758 | dev_set_name(&dev->core, "lpm_%02x", ++dev_lpm_count); |
762 | "lpm_%02x", ++dev_lpm_count); | ||
763 | break; | 759 | break; |
764 | default: | 760 | default: |
765 | BUG(); | 761 | BUG(); |
@@ -768,7 +764,7 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) | |||
768 | dev->core.archdata.of_node = NULL; | 764 | dev->core.archdata.of_node = NULL; |
769 | set_dev_node(&dev->core, 0); | 765 | set_dev_node(&dev->core, 0); |
770 | 766 | ||
771 | pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id); | 767 | pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core)); |
772 | 768 | ||
773 | result = device_register(&dev->core); | 769 | result = device_register(&dev->core); |
774 | return result; | 770 | return result; |