summaryrefslogtreecommitdiff
path: root/drivers/input/serio/serio.c
diff options
context:
space:
mode:
authorMarton Nemeth <nm127@freemail.hu>2006-11-02 23:27:21 -0500
committerDmitry Torokhov <dtor@insightbb.com>2006-11-02 23:27:21 -0500
commit1ea2a69d54f40ecebf594ce5abfa02d53682df8a (patch)
tree2f785211ef3cfe54dfb7d4ecb90a60a14bfd923c /drivers/input/serio/serio.c
parent6a89bc0004c8d9400439db6167c9887456d5d18d (diff)
Input: serio - rearrange serio_bus initialization
Initialize serio_bus structure at compile time instead of at runtime in serio_init(). Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/serio.c')
-rw-r--r--drivers/input/serio/serio.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 211943f85cb6..3cb99d454ecd 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -784,12 +784,6 @@ static int serio_driver_remove(struct device *dev)
return 0;
}
-static struct bus_type serio_bus = {
- .name = "serio",
- .probe = serio_driver_probe,
- .remove = serio_driver_remove,
-};
-
static void serio_add_driver(struct serio_driver *drv)
{
int error;
@@ -946,15 +940,21 @@ irqreturn_t serio_interrupt(struct serio *serio,
return ret;
}
+static struct bus_type serio_bus = {
+ .name = "serio",
+ .dev_attrs = serio_device_attrs,
+ .drv_attrs = serio_driver_attrs,
+ .match = serio_bus_match,
+ .uevent = serio_uevent,
+ .probe = serio_driver_probe,
+ .remove = serio_driver_remove,
+ .resume = serio_resume,
+};
+
static int __init serio_init(void)
{
int error;
- serio_bus.dev_attrs = serio_device_attrs;
- serio_bus.drv_attrs = serio_driver_attrs;
- serio_bus.match = serio_bus_match;
- serio_bus.uevent = serio_uevent;
- serio_bus.resume = serio_resume;
error = bus_register(&serio_bus);
if (error) {
printk(KERN_ERR "serio: failed to register serio bus, error: %d\n", error);