lkml.org 
[lkml]   [2004]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 39/47] allow marking some drivers as manual bind only
Date
From
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================
ChangeSet@1.1757.15.34, 2004-06-29 01:30:19-05:00, dtor_core@ameritech.net
Input: allow marking some drivers (that don't do HW autodetection)
as manual bind only. Such drivers will only be bound to a
serio port if user requests it by echoing driver name into
port's sysfs driver attribute.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


drivers/input/serio/serio.c | 9 +++++++--
include/linux/serio.h | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
===================================================================
diff -Nru a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
--- a/drivers/input/serio/serio.c Thu Jul 29 14:39:07 2004
+++ b/drivers/input/serio/serio.c Thu Jul 29 14:39:07 2004
@@ -92,8 +92,9 @@
struct serio_driver *drv;

list_for_each_entry(drv, &serio_driver_list, node)
- if (serio_bind_driver(serio, drv))
- break;
+ if (!drv->manual_bind)
+ if (serio_bind_driver(serio, drv))
+ break;
}

/*
@@ -494,6 +495,9 @@
driver_register(&drv->driver);
driver_create_file(&drv->driver, &driver_attr_description);

+ if (drv->manual_bind)
+ goto out;
+
start_over:
list_for_each_entry(serio, &serio_list, node) {
if (!serio->drv) {
@@ -507,6 +511,7 @@
}
}

+out:
up(&serio_sem);
}

diff -Nru a/include/linux/serio.h b/include/linux/serio.h
--- a/include/linux/serio.h Thu Jul 29 14:39:07 2004
+++ b/include/linux/serio.h Thu Jul 29 14:39:07 2004
@@ -55,6 +55,8 @@
void *private;
char *description;

+ int manual_bind;
+
void (*write_wakeup)(struct serio *);
irqreturn_t (*interrupt)(struct serio *, unsigned char,
unsigned int, struct pt_regs *);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans