Received: by 10.192.165.148 with SMTP id m20csp2190153imm; Sun, 22 Apr 2018 02:17:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZsUbLr3hEPIitNWz+wMcwiFDo6iA2UAYfGgLw8Cm7eV7xduz3O4IGb67kxAXiOzt6gnD8 X-Received: by 2002:a17:902:a5:: with SMTP id a34-v6mr13355976pla.58.1524388635354; Sun, 22 Apr 2018 02:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388635; cv=none; d=google.com; s=arc-20160816; b=XFSHK7BTJxCJFwyB+0FhTaoPGthMYduFJElWAgJmZxxcp10vkcggreH046SPVTUUOm ymFRfAxR+Hu7le1OcoeBDGhxOzMKx9U/eKE6zZPgGwSTTkcy8sDcsv+582XKu8U0iHrn 6GigiWUEtJg8iwe9Dvzpi4yZwbn8m6VEscT5uPOLp+3YQpnTqcIdC4W3sUcHIAhvH6fl SLt0tBdQIzTCFH84seszdXe5oKuUiBsshUHslD+jIZjJ5gEvHoXOxRCN3FaudUVV6eVb XKNWHMHnfNfJbOraG0MJRiAyhIunIzb1zqtu+GFjzlgybaAdgf5tEFpPo9mjYLDZoOD8 KaWQ== 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=HqV0HXWC2yz7I1F17sDrnl/CHqOavavYQSPYn2pQmpE=; b=GhWZeFd3n6c0L3pidB9mKRbmRWU1vz2oIsTiWjByASozO8IjvyKIPfMUxlHUSi4G9h CixgJFqpywfLpTiiQahmJtyFaIAWef6kWJ0PUGqAnCphMTA+FQBx0ddJX3ichW1lijEW fkQqPZOfzhthQElHk6dXCALz71TuuWcsbLLtmMYcW6nkJeYdUOBegaygoTLZN4MszJFO yzer8JU3bMVyipuNsYbXJb8Hqq/ie1NUHTA8oKDZ2wQLxF9Gl7PnqSyn6p7OwsYCmHJi dXY3hU7aNiqg3sMuaTmBQITNguPVO7tuDDxUU3oiDLp9YLxRhUBlJSBtKqkID2Y+oZ6v kfSA== 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 n23si8045919pgc.359.2018.04.22.02.17.01; Sun, 22 Apr 2018 02:17:15 -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 S1751769AbeDVJOU (ORCPT + 99 others); Sun, 22 Apr 2018 05:14:20 -0400 Received: from sauhun.de ([88.99.104.3]:37550 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbeDVJOT (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 45F773274F7; Sun, 22 Apr 2018 11:14:17 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Ludovic Desroches , Dan Williams , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] dmaengine: at_hdmac: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:09 +0200 Message-Id: <20180422091415.7587-2-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_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