From patchwork Wed Jan 18 17:46:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9524431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C68E60113 for ; Wed, 18 Jan 2017 17:50:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CA5B28606 for ; Wed, 18 Jan 2017 17:50:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0175728618; Wed, 18 Jan 2017 17:50:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE6A328606 for ; Wed, 18 Jan 2017 17:50:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cTuNM-0007m9-LB; Wed, 18 Jan 2017 17:50:24 +0000 Received: from bh-25.webhostbox.net ([208.91.199.152]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTuN9-0005tU-DI for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2017 17:50:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From; bh=lGZ2po/igi/WNdvckIKiTa5ImcmRHxTBpciB+GVghRo=; b=3nO/mqArNhvuBd 834fmauUMwAFO3Gy3ncPC0a2dC4i8/KU3f7I6At12CzVnrUYjnaK3ypttVRvxR3X5Hyhl5qb+eAkC sppUrjv3PrRbIaddmJ/SElKv+ISUKK/PRAoa/hqA8bBUNPGK3FH9f59yg4SHrVloqxfNABSOeFuS8 pf74QzEQze1S/e3SM1s0HfsWxyUtsZAZJhtDRmKWI7hb1MRnzR8p7jsnD0AYaRrMzwj4QXaVEDYXT iyhHUFOBrY8DsjrdQREyUWgLEYCUA3GuoGVg6ngzggx7eLC//4LVXDc1YaIGRZtR7Vh0hGe26Y03V L6q9ndTsSz0Dbo0Nwx3Q==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:45164 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1cTuKm-001jaP-2Y; Wed, 18 Jan 2017 17:47:44 +0000 From: Guenter Roeck To: Dmitry Torokhov Subject: [PATCH 09/33] Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changes Date: Wed, 18 Jan 2017 09:46:30 -0800 Message-Id: <1484761614-12225-10-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484761614-12225-1-git-send-email-linux@roeck-us.net> References: <1484761614-12225-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170118_095011_534547_FA670D44 X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Hans de Goede , Chen-Yu Tsai , Guenter Roeck , linux-input@vger.kernel.org, Maxime Ripard , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Other relevant changes: Simplify error return This conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Replace 'if (e) return e; return 0;' with 'return e;' - Drop platform_set_drvdata() Signed-off-by: Guenter Roeck Acked-by: Chen-Yu Tsai --- drivers/input/keyboard/sun4i-lradc-keys.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c index cc8f7ddcee53..c153d956778c 100644 --- a/drivers/input/keyboard/sun4i-lradc-keys.c +++ b/drivers/input/keyboard/sun4i-lradc-keys.c @@ -257,12 +257,7 @@ static int sun4i_lradc_probe(struct platform_device *pdev) if (error) return error; - error = input_register_device(lradc->input); - if (error) - return error; - - platform_set_drvdata(pdev, lradc); - return 0; + return input_register_device(lradc->input); } static const struct of_device_id sun4i_lradc_of_match[] = {