Received: by 10.192.165.148 with SMTP id m20csp2189911imm; Sun, 22 Apr 2018 02:16:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/l8RPeH/Ov2MH07uV+pWXs9JGTEcgR69i334Lryhnq9OSkT1v97P0AXG+Kv++kFxAcQyEB X-Received: by 10.99.114.88 with SMTP id c24mr13753256pgn.453.1524388615224; Sun, 22 Apr 2018 02:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388615; cv=none; d=google.com; s=arc-20160816; b=qgqNCjWV+6epeu4wEYFJUzSgT1BO3IpMbZU6+r3s1CVRWT2KN6CFh09kHJBshogq47 1MRRTftpxeg78snOXldYJEL33VRV6ej7EMWDrMB6vP62Z4F1YpU3nUtdPYUFu8rKGdmP ic0kzLZZ+bvE9yWlqiWaMF0KfYIPy2wRthumIXJwzF4PGZCa24mGkOyW3QpBRr4O4F6q ol11wo1LLYMXGIyvWvNs2+PEX1B3PDtMshqN/FXMs0ZMZrUly4c2cdNSRTiY07Foa8QM vi3xS4RpLfW7D4VR5727ksxQbQziNi5GOU8+tz2nDsBpbBUkh3DMGrxdUIubmjsjDKP+ EDXA== 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=yJrw9LYfjt2cO+PR7X0hAoVpGasOAEyiFBAT4Bvy/tE=; b=AE0SyUksU3qpZNrN2qx7n6hklxcOva4lxdKEPuTLVzxNGOYfgmAm4ZxDP5EoDysBpu AwupVN3Q1LN6i1oVxgFUPhUgGHKX+TdIpZ5Cz313LFwYXFrXpJ6+bw5OCQF3ZMePWkLo 89LbiRI7BL6wivRJ/9iA+B0Dv0ZlGeGz+cqqbBEtEXXfQMHdROC8F7RZfuonuRKU7GP5 0hWCZrabuDAMFoYGJ8hEUgpPJcyNT37PSHyUCBgoE6UQpbsRRN1TVpGgmAW7DwlcLz36 zDT6PHrDiiGVU4pjnxeyOHvAoSp1WihtUMc13Zn0x9QNN3XMNzB13MRt4ZpCm5mukDSG eP/A== 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 e5si2121828pgu.551.2018.04.22.02.16.41; Sun, 22 Apr 2018 02:16:55 -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 S1753425AbeDVJPM (ORCPT + 99 others); Sun, 22 Apr 2018 05:15:12 -0400 Received: from sauhun.de ([88.99.104.3]:37614 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbeDVJOU (ORCPT ); Sun, 22 Apr 2018 05:14:20 -0400 Received: from localhost (p5486C379.dip0.t-ipconnect.de [84.134.195.121]) by pokefinder.org (Postfix) with ESMTPSA id 97EFF3274FC; Sun, 22 Apr 2018 11:14:19 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Linus Walleij , Dan Williams , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] dmaengine: ste_dma40: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:13 +0200 Message-Id: <20180422091415.7587-6-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422091415.7587-1-wsa+renesas@sang-engineering.com> References: <20180422091415.7587-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 to your tree directly. drivers/dma/ste_dma40.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index c2b089af0420..1bc149af990e 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2889,8 +2889,7 @@ static int __init d40_dmaengine_init(struct d40_base *base, #ifdef CONFIG_PM_SLEEP static int dma40_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct d40_base *base = platform_get_drvdata(pdev); + struct d40_base *base = dev_get_drvdata(dev); int ret; ret = pm_runtime_force_suspend(dev); @@ -2904,8 +2903,7 @@ static int dma40_suspend(struct device *dev) static int dma40_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct d40_base *base = platform_get_drvdata(pdev); + struct d40_base *base = dev_get_drvdata(dev); int ret = 0; if (base->lcpa_regulator) { @@ -2970,8 +2968,7 @@ static void d40_save_restore_registers(struct d40_base *base, bool save) static int dma40_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct d40_base *base = platform_get_drvdata(pdev); + struct d40_base *base = dev_get_drvdata(dev); d40_save_restore_registers(base, true); @@ -2985,8 +2982,7 @@ static int dma40_runtime_suspend(struct device *dev) static int dma40_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct d40_base *base = platform_get_drvdata(pdev); + struct d40_base *base = dev_get_drvdata(dev); d40_save_restore_registers(base, false); -- 2.11.0