diff options
author | Kristen Carlson Accardi <kristen.c.accardi@intel.com> | 2007-05-09 18:10:22 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-05-10 03:30:41 -0400 |
commit | 79a8f70b4b9127eacfc91dd1436c4a7be05e62ab (patch) | |
tree | 2e73d3e4d31b652efa6311747e6660aca12303f4 /drivers/acpi/dock.c | |
parent | 9ef2a9a9f08722998540ed2ff38bccd0c54344c8 (diff) |
ACPI: dock: send envp with uevent
Send an env along with our KOBJ_CHANGE uevent so that user space has
the option of checking for that to see if a dock or undock has occurred.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 4efc12cf6173..dc3df93d2310 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -336,11 +336,19 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event) | |||
336 | static void dock_event(struct dock_station *ds, u32 event, int num) | 336 | static void dock_event(struct dock_station *ds, u32 event, int num) |
337 | { | 337 | { |
338 | struct device *dev = &dock_device->dev; | 338 | struct device *dev = &dock_device->dev; |
339 | char event_string[7]; | ||
340 | char *envp[] = { event_string, NULL }; | ||
341 | |||
342 | if (num == UNDOCK_EVENT) | ||
343 | sprintf(event_string, "UNDOCK"); | ||
344 | else | ||
345 | sprintf(event_string, "DOCK"); | ||
346 | |||
339 | /* | 347 | /* |
340 | * Indicate that the status of the dock station has | 348 | * Indicate that the status of the dock station has |
341 | * changed. | 349 | * changed. |
342 | */ | 350 | */ |
343 | kobject_uevent(&dev->kobj, KOBJ_CHANGE); | 351 | kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp); |
344 | } | 352 | } |
345 | 353 | ||
346 | /** | 354 | /** |