From 3aceafc1e2596f1c2c4e053126561f00b68e3a1a Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 3 Jul 2006 00:25:08 -0700 Subject: [PATCH] [PATCH] lockdep: annotate serio The PS/2 code has a natural device order and there is a one level recursion in this device order in terms of the cmd_mutex; annotate this explicit recursion as ok. Has no effect on non-lockdep kernels. Signed-off-by: Arjan van de Ven Cc: Dmitry Torokhov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/input/serio/libps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index 79c97f94bcb..61a6f977846 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c @@ -177,7 +177,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) return -1; } - mutex_lock(&ps2dev->cmd_mutex); + mutex_lock_nested(&ps2dev->cmd_mutex, SINGLE_DEPTH_NESTING); serio_pause_rx(ps2dev->serio); ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0; -- 2.41.0