From patchwork Sat Jan 21 18:45:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9530583 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 7C4CB6046F for ; Sat, 21 Jan 2017 18:47:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E4C0283BC for ; Sat, 21 Jan 2017 18:47:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63317283F9; Sat, 21 Jan 2017 18:47:35 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8875283F9 for ; Sat, 21 Jan 2017 18:47:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbdAUSrD (ORCPT ); Sat, 21 Jan 2017 13:47:03 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:49053 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdAUSq6 (ORCPT ); Sat, 21 Jan 2017 13:46:58 -0500 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=on0zbhB9drPO7C4mWKL08KIR2bJA5e7kQ9H4MM0JCtE=; b=gDd0Aj8GNdyibl 7QC3wMI8jirdTmOwaHVm0S8oPb9XxNFzTbFHSBmZ/OOg9KrO4HyiKTvUF2bP052nc0M1+AlMgjzyq lMW8aoQgvqmlY6wTsIHjDqeJ5Yfyw3bHB960MWIULNLYL4oR2Jkqf7jwvpTwebgNvO1eUslKAzXjP y4/wgUCuktJmAlpbS8Ivr5KzDw9h6Ti5gfW+bN3fCg2ig63A+Er634k73abWQbziT67XWmD05n1Cr swQ6cEQq3KCtu/AJFT+VaLdTHR62/Te7eoZ4yjfl9XRqQPL/nmBa4CApxWp7jt9GQHkDWxChx5usN PsYzIsUCT6uslQdtop3A==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:48080 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1cV0gj-001rhS-Gi; Sat, 21 Jan 2017 18:46:57 +0000 From: Guenter Roeck To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Geert Uytterhoeven Subject: [PATCH 03/13] Input: touchscreen - Drop calls to platform_set_drvdata and i2c_set_clientdata Date: Sat, 21 Jan 2017 10:45:55 -0800 Message-Id: <1485024365-3368-4-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485024365-3368-1-git-send-email-linux@roeck-us.net> References: <1485024365-3368-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 - vger.kernel.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: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no call to i2c_get_clientdata(), platform_get_drvdata(), or dev_get_drvdata() in any of the drivers in this patch. Drop the unnecessary calls to to i2c_set_clientdata() and platform_set_drvdata(). This conversion was done automatically with coccinelle. The semantic patch is available at https://github.com/groeck/coccinelle-patches/blob/master/common/pdev.cocci Signed-off-by: Guenter Roeck --- drivers/input/touchscreen/88pm860x-ts.c | 3 --- drivers/input/touchscreen/colibri-vf50-ts.c | 2 -- drivers/input/touchscreen/egalax_ts.c | 1 - drivers/input/touchscreen/max11801_ts.c | 1 - drivers/input/touchscreen/sx8654.c | 1 - 5 files changed, 8 deletions(-) diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index 251ff2aa0633..7ed828a51f4c 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c @@ -240,8 +240,6 @@ static int pm860x_touch_probe(struct platform_device *pdev) if (!touch) return -ENOMEM; - platform_set_drvdata(pdev, touch); - touch->idev = devm_input_allocate_device(&pdev->dev); if (!touch->idev) { dev_err(&pdev->dev, "Failed to allocate input device!\n"); @@ -285,7 +283,6 @@ static int pm860x_touch_probe(struct platform_device *pdev) return ret; } - platform_set_drvdata(pdev, touch); return 0; } diff --git a/drivers/input/touchscreen/colibri-vf50-ts.c b/drivers/input/touchscreen/colibri-vf50-ts.c index 69828d015d45..69c08acae264 100644 --- a/drivers/input/touchscreen/colibri-vf50-ts.c +++ b/drivers/input/touchscreen/colibri-vf50-ts.c @@ -311,8 +311,6 @@ static int vf50_ts_probe(struct platform_device *pdev) return -ENOMEM; } - platform_set_drvdata(pdev, touchdev); - input->name = DRIVER_NAME; input->id.bustype = BUS_HOST; input->dev.parent = dev; diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 1afc08b08155..3592a946950b 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -229,7 +229,6 @@ static int egalax_ts_probe(struct i2c_client *client, if (error) return error; - i2c_set_clientdata(client, ts); return 0; } diff --git a/drivers/input/touchscreen/max11801_ts.c b/drivers/input/touchscreen/max11801_ts.c index 82079cde849c..d87b89da114e 100644 --- a/drivers/input/touchscreen/max11801_ts.c +++ b/drivers/input/touchscreen/max11801_ts.c @@ -216,7 +216,6 @@ static int max11801_ts_probe(struct i2c_client *client, if (error) return error; - i2c_set_clientdata(client, data); return 0; } diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c index 642f4a53de50..ed29db3ec731 100644 --- a/drivers/input/touchscreen/sx8654.c +++ b/drivers/input/touchscreen/sx8654.c @@ -253,7 +253,6 @@ static int sx8654_probe(struct i2c_client *client, if (error) return error; - i2c_set_clientdata(client, sx8654); return 0; }