From: Kristen Carlson Accardi Date: Wed, 9 May 2007 22:10:22 +0000 (-0700) Subject: ACPI: dock: send envp with uevent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79a8f70b4b9127eacfc91dd1436c4a7be05e62ab;p=mv-sheeva.git 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 Signed-off-by: Len Brown --- diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 4efc12cf617..dc3df93d231 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) static void dock_event(struct dock_station *ds, u32 event, int num) { struct device *dev = &dock_device->dev; + char event_string[7]; + char *envp[] = { event_string, NULL }; + + if (num == UNDOCK_EVENT) + sprintf(event_string, "UNDOCK"); + else + sprintf(event_string, "DOCK"); + /* * Indicate that the status of the dock station has * changed. */ - kobject_uevent(&dev->kobj, KOBJ_CHANGE); + kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp); } /**