Commit 9c3faa99 authored by Dmitry Torokhov's avatar Dmitry Torokhov

[PATCH] serio: rename serio_[un]register_slave_port to __serio_[un]register_port

Input: rename serio_{register|unregister}_slave_port to 
       __serio_{register|unregister}_port to better follow
       locked/lockless naming convention
parent 67e9bb60
......@@ -294,7 +294,7 @@ int synaptics_pt_init(struct psmouse *psmouse)
port->driver = psmouse;
printk(KERN_INFO "serio: %s port at %s\n", port->name, psmouse->phys);
serio_register_slave_port(port);
__serio_register_port(port); /* already have serio_sem */
/* adjust the touchpad to child's choice of protocol */
child = port->private;
......@@ -406,7 +406,7 @@ void synaptics_disconnect(struct psmouse *psmouse)
if (psmouse->type == PSMOUSE_SYNAPTICS && priv) {
synaptics_mode_cmd(psmouse, 0);
if (priv->ptport) {
serio_unregister_slave_port(priv->ptport);
__serio_unregister_port(priv->ptport); /* already have serio_sem */
kfree(priv->ptport);
}
kfree(priv);
......
......@@ -49,9 +49,9 @@ MODULE_LICENSE("GPL");
EXPORT_SYMBOL(serio_interrupt);
EXPORT_SYMBOL(serio_register_port);
EXPORT_SYMBOL(serio_register_slave_port);
EXPORT_SYMBOL(__serio_register_port);
EXPORT_SYMBOL(serio_unregister_port);
EXPORT_SYMBOL(serio_unregister_slave_port);
EXPORT_SYMBOL(__serio_unregister_port);
EXPORT_SYMBOL(serio_register_device);
EXPORT_SYMBOL(serio_unregister_device);
EXPORT_SYMBOL(serio_open);
......@@ -163,17 +163,16 @@ irqreturn_t serio_interrupt(struct serio *serio,
void serio_register_port(struct serio *serio)
{
down(&serio_sem);
list_add_tail(&serio->node, &serio_list);
serio_find_dev(serio);
__serio_register_port(serio);
up(&serio_sem);
}
/*
* Same as serio_register_port but does not try to acquire serio_sem.
* Should be used when registering a serio from other input device's
* Should only be called directly if serio_sem has already been taken,
* for example when unregistering a serio from other input device's
* connect() function.
*/
void serio_register_slave_port(struct serio *serio)
void __serio_register_port(struct serio *serio)
{
list_add_tail(&serio->node, &serio_list);
serio_find_dev(serio);
......@@ -182,18 +181,16 @@ void serio_register_slave_port(struct serio *serio)
void serio_unregister_port(struct serio *serio)
{
down(&serio_sem);
list_del_init(&serio->node);
if (serio->dev && serio->dev->disconnect)
serio->dev->disconnect(serio);
__serio_unregister_port(serio);
up(&serio_sem);
}
/*
* Same as serio_unregister_port but does not try to acquire serio_sem.
* Should be used when unregistering a serio from other input device's
* Should only be called directly if serio_sem has already been taken,
* for example when unregistering a serio from other input device's
* disconnect() function.
*/
void serio_unregister_slave_port(struct serio *serio)
void __serio_unregister_port(struct serio *serio)
{
list_del_init(&serio->node);
if (serio->dev && serio->dev->disconnect)
......
......@@ -61,9 +61,9 @@ void serio_rescan(struct serio *serio);
irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs);
void serio_register_port(struct serio *serio);
void serio_register_slave_port(struct serio *serio);
void __serio_register_port(struct serio *serio);
void serio_unregister_port(struct serio *serio);
void serio_unregister_slave_port(struct serio *serio);
void __serio_unregister_port(struct serio *serio);
void serio_register_device(struct serio_dev *dev);
void serio_unregister_device(struct serio_dev *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment