ACPI: dock: send envp with uevent
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / dock.c
index 4efc12cf617333201ac9973ab9c5462c6ee024af..dc3df93d2310a6ab7c4d22dcbba8f2285efa4825 100644 (file)
@@ -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);
 }
 
 /**