Received: by 10.192.165.156 with SMTP id m28csp765899imm; Thu, 19 Apr 2018 07:14:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx49fWrvfvPgRv8FWtLzATpwZYo7bXV+58NXw7EiBmYGBDyHC3btPQtbe5CsTXoclNvVaA3PJ X-Received: by 10.99.95.76 with SMTP id t73mr5334984pgb.226.1524147273190; Thu, 19 Apr 2018 07:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147273; cv=none; d=google.com; s=arc-20160816; b=auPAI4fQrMnja9fg0cyedoBTrAa61Yj3WS3ejSY2l8wPLWx37kqwbqpnb2pMGZ/Oq5 /hOj6HIEnZ/VFzVSg5nEh1VFN2QiD31OOVSFLAb0Yegb561kp/1xeptNZSjZlB5eh/sr G9S23UFUyzoYSuKsfH8V/x3kMUuFyxdXkyeXQvYrKWwBlaEG3TK8/kh8q/A7RgbRV4i2 Qg5GpvQSjdp6+nYopdfhiWvLWXvsd1NhamYVSxC/PZXi9KLQ1B0nOHIVFc0DmtuDME4y UGdpOTXMeQSe8JnnXFsgFJep6kT8vcimO2y9eG3eW1zbxaW5Qk/ELuraN0VBUiQrLJmn Z1SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=2lR8Hnyaq/LXmNI7kGjdQQODdh2iT9JkDn7SvCECvqA=; b=b5yJppYPeY5gvVMIhTQjFs7Mh/rMokNOGiIhaeb3ht+HC0beqNTJh/s1824AUnrOo/ QT5wq/wzoY36A7dCcY6pzWhRx+jJi8ggDhVCqXev/tkUKZTobZ1rdmI/O08ITrKPIkPU vg1UC0QMdzfPzrTScc5U+5uHdP4AEQwuR1H/KJhLYx2ijgqGMxBDR2tiZqdkETZrioVG OUWohsMlqrDZf3g2xtKV+1bBpSjc75YKH8BIAYiDBvs0a2E0vvhLnYF6qQSrz1liwRnF Ms+yaKVDhYv8qMWhRoD7I1VK/QJCUV9ZctCu+uramrVWomdC/xxM4IdERZ/4GH1s4pr3 wbvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23-v6si3377277plo.80.2018.04.19.07.14.19; Thu, 19 Apr 2018 07:14:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbeDSOHI (ORCPT + 99 others); Thu, 19 Apr 2018 10:07:08 -0400 Received: from sauhun.de ([88.99.104.3]:45350 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378AbeDSOG7 (ORCPT ); Thu, 19 Apr 2018 10:06:59 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 454133139C3; Thu, 19 Apr 2018 16:06:58 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH 23/61] input: touchscreen: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:53 +0200 Message-Id: <20180419140641.27926-24-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/input/touchscreen/imx6ul_tsc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index ee82a975bfd2..da9e0a774e4b 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -515,8 +515,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) static int __maybe_unused imx6ul_tsc_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct imx6ul_tsc *tsc = platform_get_drvdata(pdev); + struct imx6ul_tsc *tsc = dev_get_drvdata(dev); struct input_dev *input_dev = tsc->input; mutex_lock(&input_dev->mutex); @@ -535,8 +534,7 @@ static int __maybe_unused imx6ul_tsc_suspend(struct device *dev) static int __maybe_unused imx6ul_tsc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct imx6ul_tsc *tsc = platform_get_drvdata(pdev); + struct imx6ul_tsc *tsc = dev_get_drvdata(dev); struct input_dev *input_dev = tsc->input; int retval = 0; -- 2.11.0