Skip to content

Commit

Permalink
ACPI: dock: send envp with uevent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kristen Carlson Accardi authored and Len Brown committed May 10, 2007
1 parent 9ef2a9a commit 79a8f70
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 79a8f70

Please sign in to comment.