Received: by 10.192.165.148 with SMTP id m20csp3046770imm; Sun, 22 Apr 2018 22:48:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx48MQEw5RriuA76teNQ5d/AbdTtNJjIgi5+0SBsF7Y0F0vST6g+0oWiD9D6x6o7X7rhL2qNK X-Received: by 10.98.10.131 with SMTP id 3mr18439556pfk.112.1524462501950; Sun, 22 Apr 2018 22:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524462501; cv=none; d=google.com; s=arc-20160816; b=jRZRD305qZxOzIVOTX++NpzL8hK2TX5PYtmchewLqVZ/yPvXqdcG8ppSrIjDG5hkkh A9ihJ3m1DqY8gLdh9nzb8hqiAzZImBYQSrsV9KhrlQfRjLaOgw9/g1qojck/ilC9mqZo 8QFmxWuyv9xDNMC//T9rBQ83oaHpj8paPoUMCeyVDJKtwl56Tf7+tWJ9WadnVfFmETKh +jQqkhOheV7V+JXy4nWHethuVV43l7a86TI4miZ7gWGih+JXUMc3CRgrVRJLtJhQtgFx 2ysUHvilbQkv1E+er1CjOhU4O49ROPBNIAXyO4xbAy510fmyIfn3/Z5ToEjvf740LdVL hjjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=E6vul/kuC0DR2rBbn3vkgEKhoRhn2WQUb1GUQPYwVBI=; b=J+rtGN6mFUiH3b1/F0zRn1ewJquVk/LLebxd7oQE6LoT5QXrkiMIl5V49DK5WhBNvD uO29xLRLAMz1N9Npy37TWorwTwjX1h8Jb2v+mVYNirrpUFJQFxr9PCjLDxjCJgt/VErh 8gMQ+Jmqf+FwqZs3fWfmj0FnEc0az1U2iTOivOqdDV066ujzSo44w3ChdCEHkzRgAcyx HEYQ8QlYFP5chBHZmocnjMTziXYVdH1V3LncsL6XJtkXz9hz/C96TQwguG1YiNgIEQZm oxl0FIIYTXr2xSgOvDkHxT3h9pj0VkAhAKK5mtpQHOKQ+9dEdy1CLV/L6VH1mIxx+uKm Ar5g== 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 f38-v6si9524501plb.44.2018.04.22.22.48.07; Sun, 22 Apr 2018 22:48:21 -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 S1751365AbeDWFq5 (ORCPT + 99 others); Mon, 23 Apr 2018 01:46:57 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:6287 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbeDWFqy (ORCPT ); Mon, 23 Apr 2018 01:46:54 -0400 X-IronPort-AV: E=Sophos;i="5.49,316,1520924400"; d="scan'208";a="13526267" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Apr 2018 22:46:54 -0700 Received: from localhost (10.10.76.4) by chn-sv-exch04.mchp-main.com (10.10.76.105) with Microsoft SMTP Server id 14.3.352.0; Sun, 22 Apr 2018 22:46:53 -0700 Date: Mon, 23 Apr 2018 07:46:12 +0200 From: Ludovic Desroches To: Wolfram Sang CC: , Ludovic Desroches , Dan Williams , Vinod Koul , , Subject: Re: [PATCH 1/6] dmaengine: at_hdmac: simplify getting .drvdata Message-ID: <20180423054612.GE13305@rfolt0960.corp.atmel.com> Mail-Followup-To: Wolfram Sang , dmaengine@vger.kernel.org, Dan Williams , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180422091415.7587-1-wsa+renesas@sang-engineering.com> <20180422091415.7587-2-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180422091415.7587-2-wsa+renesas@sang-engineering.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 22, 2018 at 11:14:09AM +0200, Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Acked-by: Ludovic Desroches Thanks > --- > > Build tested only. buildbot is happy. Please apply to your tree directly. > > drivers/dma/at_hdmac.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c > index a861b5b4d443..75f38d19fcbe 100644 > --- a/drivers/dma/at_hdmac.c > +++ b/drivers/dma/at_hdmac.c > @@ -2041,8 +2041,7 @@ static void at_dma_shutdown(struct platform_device *pdev) > > static int at_dma_prepare(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct at_dma *atdma = platform_get_drvdata(pdev); > + struct at_dma *atdma = dev_get_drvdata(dev); > struct dma_chan *chan, *_chan; > > list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels, > @@ -2076,8 +2075,7 @@ static void atc_suspend_cyclic(struct at_dma_chan *atchan) > > static int at_dma_suspend_noirq(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct at_dma *atdma = platform_get_drvdata(pdev); > + struct at_dma *atdma = dev_get_drvdata(dev); > struct dma_chan *chan, *_chan; > > /* preserve data */ > @@ -2118,8 +2116,7 @@ static void atc_resume_cyclic(struct at_dma_chan *atchan) > > static int at_dma_resume_noirq(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct at_dma *atdma = platform_get_drvdata(pdev); > + struct at_dma *atdma = dev_get_drvdata(dev); > struct dma_chan *chan, *_chan; > > /* bring back DMA controller */ > -- > 2.11.0 >