From bf470ea0101b8a3a05f5a5f35b0dc6aeb00fe818 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 16 Jun 2007 07:55:20 +1000 Subject: [PATCH] --- yaml --- r: 60576 b: refs/heads/master c: 6758555da6a171d3f21ce36c0e12a2b8cff7ca9d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/ps3/system-bus.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a7a6cbcaeaa3..901ea0914184 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 688b3378da9c3485630d4b0356d09bc2e69bb0bd +refs/heads/master: 6758555da6a171d3f21ce36c0e12a2b8cff7ca9d diff --git a/trunk/arch/powerpc/platforms/ps3/system-bus.c b/trunk/arch/powerpc/platforms/ps3/system-bus.c index 633603a53819..4bb634a17e43 100644 --- a/trunk/arch/powerpc/platforms/ps3/system-bus.c +++ b/trunk/arch/powerpc/platforms/ps3/system-bus.c @@ -452,6 +452,20 @@ static int ps3_system_bus_uevent(struct device *_dev, char **envp, return 0; } +static ssize_t modalias_show(struct device *_dev, struct device_attribute *a, + char *buf) +{ + struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); + int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id); + + return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; +} + +static struct device_attribute ps3_system_bus_dev_attrs[] = { + __ATTR_RO(modalias), + __ATTR_NULL, +}; + struct bus_type ps3_system_bus_type = { .name = "ps3_system_bus", .match = ps3_system_bus_match, @@ -459,6 +473,7 @@ struct bus_type ps3_system_bus_type = { .probe = ps3_system_bus_probe, .remove = ps3_system_bus_remove, .shutdown = ps3_system_bus_shutdown, + .dev_attrs = ps3_system_bus_dev_attrs, }; static int __init ps3_system_bus_init(void)