diff mbox series

Input: spear-keyboard - Simplify resource management

Message ID c4b6e8b122259198ce76f42bf786b75cfd0cbffc.1643530826.git.christophe.jaillet@wanadoo.fr
State New
Headers show
Series Input: spear-keyboard - Simplify resource management | expand

Commit Message

Christophe JAILLET Jan. 30, 2022, 8:20 a.m. UTC
Since the commit in the Fixes tag below, 'kbd->input' is a managed resource
that doesn't need to be explicitly unregistered or freed (see
devm_input_allocate_device() documentation)

So, remove a unless line of code to slightly simplify it.

Fixes: 6102752eb354 ("Input: spear-keyboard - switch to using managed resources")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only
---
 drivers/input/keyboard/spear-keyboard.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
index 9838c79cb288..c36836159fb3 100644
--- a/drivers/input/keyboard/spear-keyboard.c
+++ b/drivers/input/keyboard/spear-keyboard.c
@@ -278,7 +278,6 @@  static int spear_kbd_remove(struct platform_device *pdev)
 {
 	struct spear_kbd *kbd = platform_get_drvdata(pdev);
 
-	input_unregister_device(kbd->input);
 	clk_unprepare(kbd->clk);
 
 	return 0;