aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/serio/serio.c6
-rw-r--r--include/linux/serio.h5
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index f0ce822c1028..17c8c63cbe1a 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -45,7 +45,7 @@ EXPORT_SYMBOL(serio_interrupt);
45EXPORT_SYMBOL(__serio_register_port); 45EXPORT_SYMBOL(__serio_register_port);
46EXPORT_SYMBOL(serio_unregister_port); 46EXPORT_SYMBOL(serio_unregister_port);
47EXPORT_SYMBOL(serio_unregister_child_port); 47EXPORT_SYMBOL(serio_unregister_child_port);
48EXPORT_SYMBOL(serio_register_driver); 48EXPORT_SYMBOL(__serio_register_driver);
49EXPORT_SYMBOL(serio_unregister_driver); 49EXPORT_SYMBOL(serio_unregister_driver);
50EXPORT_SYMBOL(serio_open); 50EXPORT_SYMBOL(serio_open);
51EXPORT_SYMBOL(serio_close); 51EXPORT_SYMBOL(serio_close);
@@ -789,12 +789,14 @@ static void serio_attach_driver(struct serio_driver *drv)
789 drv->driver.name, error); 789 drv->driver.name, error);
790} 790}
791 791
792int serio_register_driver(struct serio_driver *drv) 792int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name)
793{ 793{
794 int manual_bind = drv->manual_bind; 794 int manual_bind = drv->manual_bind;
795 int error; 795 int error;
796 796
797 drv->driver.bus = &serio_bus; 797 drv->driver.bus = &serio_bus;
798 drv->driver.owner = owner;
799 drv->driver.mod_name = mod_name;
798 800
799 /* 801 /*
800 * Temporarily disable automatic binding because probing 802 * Temporarily disable automatic binding because probing
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 0f478a8791a2..ac2c70e7f760 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio)
86void serio_unregister_port(struct serio *serio); 86void serio_unregister_port(struct serio *serio);
87void serio_unregister_child_port(struct serio *serio); 87void serio_unregister_child_port(struct serio *serio);
88 88
89int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name);
90static inline int serio_register_driver(struct serio_driver *drv)
91{
92 return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
93}
89int serio_register_driver(struct serio_driver *drv); 94int serio_register_driver(struct serio_driver *drv);
90void serio_unregister_driver(struct serio_driver *drv); 95void serio_unregister_driver(struct serio_driver *drv);
91 96