diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index 633603a53819..4bb634a17e43 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -452,6 +452,20 @@ static int ps3_system_bus_uevent(struct device *_dev, char **envp, | |||
452 | return 0; | 452 | return 0; |
453 | } | 453 | } |
454 | 454 | ||
455 | static ssize_t modalias_show(struct device *_dev, struct device_attribute *a, | ||
456 | char *buf) | ||
457 | { | ||
458 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | ||
459 | int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id); | ||
460 | |||
461 | return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; | ||
462 | } | ||
463 | |||
464 | static struct device_attribute ps3_system_bus_dev_attrs[] = { | ||
465 | __ATTR_RO(modalias), | ||
466 | __ATTR_NULL, | ||
467 | }; | ||
468 | |||
455 | struct bus_type ps3_system_bus_type = { | 469 | struct bus_type ps3_system_bus_type = { |
456 | .name = "ps3_system_bus", | 470 | .name = "ps3_system_bus", |
457 | .match = ps3_system_bus_match, | 471 | .match = ps3_system_bus_match, |
@@ -459,6 +473,7 @@ struct bus_type ps3_system_bus_type = { | |||
459 | .probe = ps3_system_bus_probe, | 473 | .probe = ps3_system_bus_probe, |
460 | .remove = ps3_system_bus_remove, | 474 | .remove = ps3_system_bus_remove, |
461 | .shutdown = ps3_system_bus_shutdown, | 475 | .shutdown = ps3_system_bus_shutdown, |
476 | .dev_attrs = ps3_system_bus_dev_attrs, | ||
462 | }; | 477 | }; |
463 | 478 | ||
464 | static int __init ps3_system_bus_init(void) | 479 | static int __init ps3_system_bus_init(void) |