From: Kristen Accardi <kristen.c.accardi@intel.com>
Date: Sat, 24 Jun 2006 23:36:00 +0000 (-0400)
Subject: KEVENT: add new uevent for dock
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6a888b3c20cf559c8a2e6e4d86c570dda2ef0f5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

KEVENT: add new uevent for dock

so that userspace can be notified of dock and undock events.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---

diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d229327959e..0503b2ed8bae 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -46,6 +46,8 @@ enum kobject_action {
 	KOBJ_UMOUNT	= (__force kobject_action_t) 0x05,	/* umount event for block devices (broken) */
 	KOBJ_OFFLINE	= (__force kobject_action_t) 0x06,	/* device offline */
 	KOBJ_ONLINE	= (__force kobject_action_t) 0x07,	/* device online */
+	KOBJ_UNDOCK	= (__force kobject_action_t) 0x08, 	/* undocking */
+	KOBJ_DOCK	= (__force kobject_action_t) 0x09,	/* dock */
 };
 
 struct kobject {
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 7f20e7b857cb..2b1530fc573b 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -50,6 +50,10 @@ static char *action_to_string(enum kobject_action action)
 		return "offline";
 	case KOBJ_ONLINE:
 		return "online";
+	case KOBJ_DOCK:
+		return "dock";
+	case KOBJ_UNDOCK:
+		return "undock";
 	default:
 		return NULL;
 	}