Skip to content

Commit

Permalink
SERIO: add the sysfs driver name to all modules
Browse files Browse the repository at this point in the history
This adds the module name to all SERIO drivers, if they are built into
the kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Feb 7, 2007
1 parent 725522b commit 4b31562
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/input/serio/serio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ EXPORT_SYMBOL(serio_interrupt);
EXPORT_SYMBOL(__serio_register_port);
EXPORT_SYMBOL(serio_unregister_port);
EXPORT_SYMBOL(serio_unregister_child_port);
EXPORT_SYMBOL(serio_register_driver);
EXPORT_SYMBOL(__serio_register_driver);
EXPORT_SYMBOL(serio_unregister_driver);
EXPORT_SYMBOL(serio_open);
EXPORT_SYMBOL(serio_close);
Expand Down Expand Up @@ -789,12 +789,14 @@ static void serio_attach_driver(struct serio_driver *drv)
drv->driver.name, error);
}

int serio_register_driver(struct serio_driver *drv)
int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name)
{
int manual_bind = drv->manual_bind;
int error;

drv->driver.bus = &serio_bus;
drv->driver.owner = owner;
drv->driver.mod_name = mod_name;

/*
* Temporarily disable automatic binding because probing
Expand Down
5 changes: 5 additions & 0 deletions include/linux/serio.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio)
void serio_unregister_port(struct serio *serio);
void serio_unregister_child_port(struct serio *serio);

int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name);
static inline int serio_register_driver(struct serio_driver *drv)
{
return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
}
int serio_register_driver(struct serio_driver *drv);
void serio_unregister_driver(struct serio_driver *drv);

Expand Down

0 comments on commit 4b31562

Please sign in to comment.