aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 02:40:01 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 02:40:01 -0500
commitdbf4ccd6043e58ed32fbf253fb3f0a9991e4c13a (patch)
treedeeb41b5006f28967466ae2775af09542d10ca7e /drivers/input/serio
parentInput: cleanup ps2_command() timeout handling in libps2. (diff)
downloadlinux-dev-dbf4ccd6043e58ed32fbf253fb3f0a9991e4c13a.tar.xz
linux-dev-dbf4ccd6043e58ed32fbf253fb3f0a9991e4c13a.zip
Input: psmouse - export protocol as a sysfs per-device attribute
to allow easy switching at run-time. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/serio.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index b82815a0b65b..615bf62ad468 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -42,6 +42,7 @@ MODULE_LICENSE("GPL");
EXPORT_SYMBOL(serio_interrupt);
EXPORT_SYMBOL(__serio_register_port);
EXPORT_SYMBOL(serio_unregister_port);
+EXPORT_SYMBOL(serio_unregister_child_port);
EXPORT_SYMBOL(__serio_unregister_port_delayed);
EXPORT_SYMBOL(__serio_register_driver);
EXPORT_SYMBOL(serio_unregister_driver);
@@ -179,12 +180,12 @@ static void serio_queue_event(void *object, struct module *owner,
spin_lock_irqsave(&serio_event_lock, flags);
/*
- * Scan event list for the other events for the same serio port,
+ * Scan event list for the other events for the same serio port,
* starting with the most recent one. If event is the same we
* do not need add new one. If event is of different type we
* need to add this event and should not look further because
* we need to preseve sequence of distinct events.
- */
+ */
list_for_each_entry_reverse(event, &serio_event_list, node) {
if (event->object == object) {
if (event->type == event_type)
@@ -654,6 +655,19 @@ void serio_unregister_port(struct serio *serio)
}
/*
+ * Safely unregisters child port if one is present.
+ */
+void serio_unregister_child_port(struct serio *serio)
+{
+ down(&serio_sem);
+ if (serio->child) {
+ serio_disconnect_port(serio->child);
+ serio_destroy_port(serio->child);
+ }
+ up(&serio_sem);
+}
+
+/*
* Submits register request to kseriod for subsequent execution.
* Can be used when it is not obvious whether the serio_sem is
* taken or not and when delayed execution is feasible.