From patchwork Sat Apr 23 19:57:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 8918881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C5C8A9F39A for ; Sat, 23 Apr 2016 19:59:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DDDCF20122 for ; Sat, 23 Apr 2016 19:59:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1417720121 for ; Sat, 23 Apr 2016 19:59:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbcDWT7Z (ORCPT ); Sat, 23 Apr 2016 15:59:25 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:61545 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829AbcDWT7Y (ORCPT ); Sat, 23 Apr 2016 15:59:24 -0400 Received: from localhost.localdomain ([95.91.39.67]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MVmBj-1bE5eQ0azf-00Z2Ci; Sat, 23 Apr 2016 21:58:25 +0200 From: Stefan Wahren To: Jonathan Cameron , Dmitry Torokhov , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marek Vasut Cc: Ksenija Stanojevic , Fabio Estevam , Juergen Borleis , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V3 2/3] iio: mxs-lradc: remove mxs_lradc_ts_unregister Date: Sat, 23 Apr 2016 19:57:58 +0000 Message-Id: <1461441479-23218-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1461441479-23218-1-git-send-email-stefan.wahren@i2se.com> References: <1461441479-23218-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:OJ19sFAtmkDV8SqABZmt13qh/utaVUc+YvvU2rJsZ0P20rvrCsL 1faFe9DZd8CZWpf8qm8cnBIonqdkZ8RM3vjc4ioq0M/msqapEigkjCWPH9KGyOG4UMnSHK6 MOxemysqAUrKMdQu85n4Xt6cI0ZCOY01+sGyo04s+dkiVvbgRH61KL63f1p7OuQIro1L5fw Yrm98YFz3M4AVSTrLFwmQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:D4gdvFvHnKM=:aNlyo8jBcsZZzfyGXJuh2a B2CcXMV2yY3Xb8Y/SQTlZ2AjzqB8SKkseuXxAZ6+LiwTljflBYVTBQ8Gi06nnxn5OVHQtvSQO nWYX0HbA21gbX7HZ8CD6CE1J4fhlqOFRz4A6toZBGDCcyiAN0DJF+T2xk1yotDvQlFIqaiKcl zAB6mloZ+iByKLBwJmfwOvdhDnVc98YJ22hPKCzU/nffeechM8HaJB+EPVVcR+J1rRFm3A07H xmnYs2QJXmvcZYTsuAgjLRHj+p8Gxp5xh+kfy7b98KAjSmXbJtq1Mzqg4d3dn/INh1RrIlZfK Mh4tSCwKrYqrDSm+Fr5kNfyMGYxupdHYw3am8qHuvit185E1cAmWeAAlcubkF22mYfeIV9MO+ JNBOHiX4ceH5vsVZiRbwaBo8F4psWFwLBJ9hylgOoEqweNXChHKUEUz0Y+Y07V1qkTYqCyEIr NeGP5ESqHlmi+rIyszW7QwqhLJQfk2hVz3wdgdIom2SaswB6IGogqJ7i1HvezsuoQ/H2LjX1X k2MnHI5si+Dvkk7v9ksJlxbpQrJdCjJEaio5qiZZRoeTzkIzIAeM3yekxQgEzZC9g8Q030PWb 3oeNgp2Nqe7CdZ9zQ8aTMknHjt9yHkDUGUMtN2vjzAbaXSePcmje8p7zqkkzmQY06ks0h+iFf KXu+PeVy0N6ph4F7FcqOM/+FLqVQpiRd3BMGaW5UGelLiqLvFMyORm02PwmKM8bCFES8= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After using devm_input_allocate_device for registration the function mxs_lradc_ts_unregister isn't necessary anymore since mxs_lradc_ts_close already does the job. Signed-off-by: Stefan Wahren Suggested-by: Dmitry Torokhov Acked-by: Dmitry Torokhov --- drivers/iio/adc/mxs-lradc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/iio/adc/mxs-lradc.c b/drivers/iio/adc/mxs-lradc.c index 3d1d370..90242ba 100644 --- a/drivers/iio/adc/mxs-lradc.c +++ b/drivers/iio/adc/mxs-lradc.c @@ -1148,14 +1148,6 @@ static int mxs_lradc_ts_register(struct mxs_lradc *lradc) return input_register_device(input); } -static void mxs_lradc_ts_unregister(struct mxs_lradc *lradc) -{ - if (!lradc->use_touchscreen) - return; - - mxs_lradc_disable_ts(lradc); -} - /* * IRQ Handling */ @@ -1715,13 +1707,11 @@ static int mxs_lradc_probe(struct platform_device *pdev) ret = iio_device_register(iio); if (ret) { dev_err(dev, "Failed to register IIO device\n"); - goto err_ts; + return ret; } return 0; -err_ts: - mxs_lradc_ts_unregister(lradc); err_ts_register: mxs_lradc_hw_stop(lradc); err_dev: @@ -1739,7 +1729,6 @@ static int mxs_lradc_remove(struct platform_device *pdev) struct mxs_lradc *lradc = iio_priv(iio); iio_device_unregister(iio); - mxs_lradc_ts_unregister(lradc); mxs_lradc_hw_stop(lradc); mxs_lradc_trigger_remove(iio); iio_triggered_buffer_cleanup(iio);