Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3286655yba; Tue, 23 Apr 2019 00:43:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYGQovCh+YALcVe0zGLVZepdUY0/zNu+CS0d9yRIJdhfvMbbZ5M6hrl5AaK2c6nHm5qdzC X-Received: by 2002:a63:e304:: with SMTP id f4mr23164085pgh.374.1556005434995; Tue, 23 Apr 2019 00:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005434; cv=none; d=google.com; s=arc-20160816; b=VHj0BQcYa9BahmU848mHCt8ZOX8x1JG9Bu1AlPNolQInQVlVpcJbw2P3iVFgjS6mLM WB4+1rZoPc/Hg4tcFOm9gevj6FP5dL27D5UF0NyEMVTeqg5Oe8VpqTKwEUohKVKOlldm uvP5XK7iv6Cd81TCVmQM6+h5eFF+BoVZNzm7llu1phfo88959HAN+tFaONl1xk002Iae lrqaMSnts9DJuvGDDNvCw40u9Kmd4v4uKmQBFbKgmqRIpJ+fx6ZiYYVxXr0lSj7zDQZw jXweP0NjYpchftyDDhY2B2wj6HrTK5c+eoWKb+NMZ6bGRx6eJLHSJHURDdUyj0yc+ToH s40w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I+kgLgv1RfwoOML4I75llV+jDCoWxmxIlKVhYxf+Wxc=; b=YCdvG44frpAUUP4aYwlFkn4HfbkYBIoYp7pPr66EY5rQy8fS1gpsr51AYI+fa7pAGr 5grW7cKqixbYNdH6tQR+eI24RA+ndfbWh2swkkdxbV6uR+rHxgu2S7JTsRiUtgavdbMo GqqThCAgqHNMy9oDoFKMNjUb/48VexORZIbm3Lu0CFqZV/2aadtkyAbD76CE1XO4xyEQ EFG9sMEBMY3v/+PREPANUyS138YCGmaZ5cgnLm8s9spw2/Z28oVKHAwfaKU3g5UJXFNS w4F9WJG4yz6k3IdZx7drxUEmmgvz5NJfupeV18fAN6IKokVgG5cbRtOfQbxieUzRJPvs 0lYQ== 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 f6si16225144plf.90.2019.04.23.00.43.39; Tue, 23 Apr 2019 00:43:54 -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 S1727014AbfDWHlN (ORCPT + 99 others); Tue, 23 Apr 2019 03:41:13 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7223 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726710AbfDWHkZ (ORCPT ); Tue, 23 Apr 2019 03:40:25 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5CAE77D9C69E216994C9; Tue, 23 Apr 2019 15:40:17 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:09 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Dmitry Torokhov , Shawn Guo , Sascha Hauer , Subject: [PATCH next 12/25] input: touchscreen: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:07 +0800 Message-ID: <20190423075020.173734-13-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: Dmitry Torokhov Cc: Shawn Guo Cc: Sascha Hauer Cc: linux-input@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/input/touchscreen/imx6ul_tsc.c | 6 ++---- drivers/input/touchscreen/s3c2410_ts.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index c10fc594f94d..493322ed0e34 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -511,8 +511,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); @@ -531,8 +530,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; diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 1173890f6719..e5e9f6527ed8 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -396,8 +396,7 @@ static int s3c2410ts_suspend(struct device *dev) static int s3c2410ts_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c2410_ts_mach_info *info = dev_get_platdata(&pdev->dev); + struct s3c2410_ts_mach_info *info = dev_get_platdata(dev); clk_enable(ts.clock); enable_irq(ts.irq_tc); -- 2.20.1