aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/serio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 5895202b972..a8f3bc1dff2 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -769,8 +769,10 @@ static int serio_driver_remove(struct device *dev)
static void serio_cleanup(struct serio *serio)
{
+ mutex_lock(&serio->drv_mutex);
if (serio->drv && serio->drv->cleanup)
serio->drv->cleanup(serio);
+ mutex_unlock(&serio->drv_mutex);
}
static void serio_shutdown(struct device *dev)