From patchwork Sun Jan 30 08:20:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 538613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB1DC433F5 for ; Sun, 30 Jan 2022 08:20:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354379AbiA3IUt (ORCPT ); Sun, 30 Jan 2022 03:20:49 -0500 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:50259 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234792AbiA3IUr (ORCPT ); Sun, 30 Jan 2022 03:20:47 -0500 Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id E5S2nTPu9uCn2E5S2n1kH4; Sun, 30 Jan 2022 09:20:46 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 30 Jan 2022 09:20:46 +0100 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: Dmitry Torokhov , Viresh Kumar Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-input@vger.kernel.org Subject: [PATCH] Input: spear-keyboard - Simplify resource management Date: Sun, 30 Jan 2022 09:20:44 +0100 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 --- Compile tested only --- drivers/input/keyboard/spear-keyboard.c | 1 - 1 file changed, 1 deletion(-) 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;