Received: by 10.192.165.148 with SMTP id m20csp2190748imm; Sun, 22 Apr 2018 02:18:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZvW3YhIaNpoWjCd8EnqUpxPE6dDsfrCtMRZW1ma8SlaHK24rSp71Qw1IUPBQtBzC32UxH X-Received: by 10.98.138.68 with SMTP id y65mr15686253pfd.110.1524388687847; Sun, 22 Apr 2018 02:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388687; cv=none; d=google.com; s=arc-20160816; b=DPJOACw87oV4rAolYUgUcS1kGjswRATgFFvhYpri8QaR5DU6PQb8gNkxXGCfR93k1v NcRfcxOP+HEdlX9l7k0j2INZ3Sr0ivOG8h5n62smtGHI27bq+GFHuN/MYFIcnHyNLHls qxEjbJCeNEzwgjDLDEzH9gNA5X7brWy4+TTk6svB4VCNWzZURz5c1fxY9TGKtnnSOCDe 4PyDDIDExqNZ9AmhQhoFOfd1GyneaNLu+Kvyuc7F2hKGPjtAw7OzYCG96gb+esC6+haF +bxk9+PsSMDHNvUC6VHDB//0sFZ4QHZ2aNQL/S8LB4rr0YPCZLovOQIDOk+NCpevD9H3 X3Eg== 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=A5Z9iyR+kaIcXPjq15ZFjLckSB0UXxR4h5P4fVT7BOw=; b=nNXSNNVbte9brvqMyVpcxnKUKrwvqdEf3am9NtT8e31pB1kB4YpMZjRcfYbElQEA4j oUs2Pd9WudT2xCVZqcR/NQR8lcNOLLLzzIXN7DiV1FvXoKroVvDXIFotocT4TjioQGJK mGjIcXro/SrcLsSB1rXXEZ6XF6rznwk1yEE6zfN1zwL30P2SOuaNUYyK63syoH+nDXwr 87IAWOTN4UplxgxjYmBJHbGYJQWs0oNQYggrFqou4DYI1BxChtMWTYSCPkdXSjvwBmGh 7g0Ciq1jgXaYQ+0OUn9A0f353WWiBfthJdwTYqLqPS6AaMuAVd/Yu28k8kw2UV1CGR5+ o6uQ== 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 s3si7916710pgr.421.2018.04.22.02.17.53; Sun, 22 Apr 2018 02:18:07 -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 S1753498AbeDVJPu (ORCPT + 99 others); Sun, 22 Apr 2018 05:15:50 -0400 Received: from sauhun.de ([88.99.104.3]:37586 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbeDVJOT (ORCPT ); Sun, 22 Apr 2018 05:14:19 -0400 Received: from localhost (p5486C379.dip0.t-ipconnect.de [84.134.195.121]) by pokefinder.org (Postfix) with ESMTPSA id 6CA163274F9; Sun, 22 Apr 2018 11:14:18 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Li Yang , Zhang Wei , Vinod Koul , Dan Williams , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] dmaengine: fsldma: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:11 +0200 Message-Id: <20180422091415.7587-4-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/fsldma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 3eaece888e75..1117b5123a6f 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -1328,8 +1328,7 @@ static int fsldma_of_remove(struct platform_device *op) #ifdef CONFIG_PM static int fsldma_suspend_late(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fsldma_device *fdev = platform_get_drvdata(pdev); + struct fsldma_device *fdev = dev_get_drvdata(dev); struct fsldma_chan *chan; int i; @@ -1360,8 +1359,7 @@ static int fsldma_suspend_late(struct device *dev) static int fsldma_resume_early(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fsldma_device *fdev = platform_get_drvdata(pdev); + struct fsldma_device *fdev = dev_get_drvdata(dev); struct fsldma_chan *chan; u32 mode; int i; -- 2.11.0