From patchwork Mon Jan 23 00:48:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9531567 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 C899A6020B for ; Mon, 23 Jan 2017 00:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B327627E3E for ; Mon, 23 Jan 2017 00:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7E5C27E33; Mon, 23 Jan 2017 00:49:26 +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=ham 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 8A3BE27E33 for ; Mon, 23 Jan 2017 00:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750871AbdAWAtK (ORCPT ); Sun, 22 Jan 2017 19:49:10 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:54048 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbdAWAtF (ORCPT ); Sun, 22 Jan 2017 19:49:05 -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=kQ0iNz5mhgNUHWIfwgqLfrFpKP2JBlahPi6wgKtJA+0=; b=xj2xBtDPq2VEpU vToi/KzhJt3kNx5RojwxhSJYgfErY6bdhIcvmdMhAtbbMoA2z+ybL3PhzjOKXCYJnkACIeHInawIs Pk52Znqlg2CNx12AQb+fUKW+5/AITBRyi3E/nFjRQWa6DA4qUgCFdCDI0z1ovKE6X8xM0s83Ixi/P dmkmDOjuBTXrN+X2ewoT3KWLGULPkU0WiQ5fdq/I035lVrlxbDJUfWSkAdoxrIaKQZH1r0uDr4ACo nTQ2X1WpgTFwobBgtrO0UaV4fpq0JB8TJsolOoslD7Dpw19/xSgKol34tsg2nBjt8EJJSv3k4tirw TSKfyB2v5hpO74YQm78g==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:35506 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1cVSoY-000I0r-B6; Mon, 23 Jan 2017 00:48:54 +0000 From: Guenter Roeck To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 2/5] Input: joystick/maplecontrol - drop unnecessary call to input_set_drvdata Date: Sun, 22 Jan 2017 16:48:21 -0800 Message-Id: <1485132505-14562-3-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485132505-14562-1-git-send-email-linux@roeck-us.net> References: <1485132505-14562-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 Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. The conversion was done automatically using the following coccinelle script. @used@ @@ ( input_get_drvdata(...) | dev_get_drvdata(...) ) @depends on !used@ @@ - input_set_drvdata(...); Signed-off-by: Guenter Roeck --- drivers/input/joystick/maplecontrol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 8aa6e4c497da..ff54e195d42c 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c @@ -139,7 +139,6 @@ static int probe_maple_controller(struct device *dev) idev->dev.parent = &mdev->dev; idev->name = mdev->product_name; idev->id.bustype = BUS_HOST; - input_set_drvdata(idev, pad); error = input_register_device(idev); if (error)