diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-06-15 17:55:14 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-28 05:16:38 -0400 |
commit | 688b3378da9c3485630d4b0356d09bc2e69bb0bd (patch) | |
tree | 3d5b2a88ca6de6546a5d7f6b9b4af905d0c66235 | |
parent | 6bb5cf1025414fe00b20f3bef56135849e4ed3b8 (diff) |
[POWERPC] PS3: System-bus uevent
To allow userspace to automatically load modules, we need to hook up
uevent for ps3_system_bus devices. I've used the form 'ps3:%d' with
the ps3_match_id, since that's what we use for matching drivers.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index 14bbaff93e57..633603a53819 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -437,9 +437,25 @@ static void ps3_system_bus_shutdown(struct device *_dev) | |||
437 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); | 437 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); |
438 | } | 438 | } |
439 | 439 | ||
440 | static int ps3_system_bus_uevent(struct device *_dev, char **envp, | ||
441 | int num_envp, char *buffer, int buffer_size) | ||
442 | { | ||
443 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | ||
444 | int i = 0, length = 0; | ||
445 | |||
446 | if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, | ||
447 | &length, "MODALIAS=ps3:%d", | ||
448 | dev->match_id)) | ||
449 | return -ENOMEM; | ||
450 | |||
451 | envp[i] = NULL; | ||
452 | return 0; | ||
453 | } | ||
454 | |||
440 | struct bus_type ps3_system_bus_type = { | 455 | struct bus_type ps3_system_bus_type = { |
441 | .name = "ps3_system_bus", | 456 | .name = "ps3_system_bus", |
442 | .match = ps3_system_bus_match, | 457 | .match = ps3_system_bus_match, |
458 | .uevent = ps3_system_bus_uevent, | ||
443 | .probe = ps3_system_bus_probe, | 459 | .probe = ps3_system_bus_probe, |
444 | .remove = ps3_system_bus_remove, | 460 | .remove = ps3_system_bus_remove, |
445 | .shutdown = ps3_system_bus_shutdown, | 461 | .shutdown = ps3_system_bus_shutdown, |