Received: by 10.192.165.148 with SMTP id m20csp2190672imm; Sun, 22 Apr 2018 02:18:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+VZu/dByeM7Lb7MjpFMleOQRQtOdv0T8Rwgvb8s4sC9TQoVFyY35vpPXNY8THgrAwkhL9x X-Received: by 10.99.97.8 with SMTP id v8mr13549368pgb.245.1524388682313; Sun, 22 Apr 2018 02:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388682; cv=none; d=google.com; s=arc-20160816; b=BXymJsZNyK5VilLZGb8EK3omiEZKaChAQgs2duezJonaI69O6vl38x1GFEQRCqdXVe omcANXjqZXF6JBGRNLP6dtUygQpkwBbgcLYo4tJirM8F1W9T86Q5ZMHf8HAuJcV+/AtR PVrr2N90KwlzvpNAJWUKOvm1hp2S4Hy/dESQlPKwWd8tyiEajDuyBnc7m3eo/oUIJD7L oqSZwxjMyfnLZDR4p85Thgy+xNPtiSRd1k472y+5/J81CNdDLEZdP8Sh3O9X0gwdRVtp cYwCG+fVLjgZU+TEXzSK9m7NSxXVZ06Vy2q6/ro2lXGyfTHdrxp9uqCDOZiLbYfydBqJ Mrow== 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=hoPT5rSycRfihttm7BfWvy9IwqU1sFIVARH+efRI8xw=; b=jqXc0f6sNfML7vZ+bdvJCiyFoQ4WkYYV8GhoR8sA9a6wW2ow1jYaMhnu9zWh9thUHn JXYjxz/8MBmPh433byfM4n6kaG9oYPuFf7ivLvbsmvr60Htx6Cgg3Uqht0TzUOUUnDub wb28yeeyChU/FyiPlBAFHlqD2wKsL2nvjtLb2Xs2QL7Y362t4K47H4JYXC8DOW7KzFNq qHrY94bV7ottfdGQgzE/82Dd/elo0Mc8z+2hiIQ3hxE5Z2wEXgqy0Ira7j3Gm1MArVXK S8sgP/RQ58sL667JdzGStR1NkyPBKtwJ/4M2FFkxe4Oiir1ojnJik5kRv9p0VpVy9Mxu 84mQ== 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 s130si3725655pgc.672.2018.04.22.02.17.42; Sun, 22 Apr 2018 02:18:02 -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 S1753515AbeDVJPv (ORCPT + 99 others); Sun, 22 Apr 2018 05:15:51 -0400 Received: from sauhun.de ([88.99.104.3]:37568 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbeDVJOT (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 D4DF73274F8; Sun, 22 Apr 2018 11:14:17 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Ludovic Desroches , Vinod Koul , Dan Williams , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] dmaengine: at_xdmac: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:10 +0200 Message-Id: <20180422091415.7587-3-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/at_xdmac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 94236ec9d410..4bf72561667c 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1833,8 +1833,7 @@ static void at_xdmac_free_chan_resources(struct dma_chan *chan) #ifdef CONFIG_PM static int atmel_xdmac_prepare(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct at_xdmac *atxdmac = platform_get_drvdata(pdev); + struct at_xdmac *atxdmac = dev_get_drvdata(dev); struct dma_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { @@ -1853,8 +1852,7 @@ static int atmel_xdmac_prepare(struct device *dev) #ifdef CONFIG_PM_SLEEP static int atmel_xdmac_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct at_xdmac *atxdmac = platform_get_drvdata(pdev); + struct at_xdmac *atxdmac = dev_get_drvdata(dev); struct dma_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { @@ -1878,8 +1876,7 @@ static int atmel_xdmac_suspend(struct device *dev) static int atmel_xdmac_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct at_xdmac *atxdmac = platform_get_drvdata(pdev); + struct at_xdmac *atxdmac = dev_get_drvdata(dev); struct at_xdmac_chan *atchan; struct dma_chan *chan, *_chan; int i; -- 2.11.0