Received: by 10.192.165.148 with SMTP id m20csp2189401imm; Sun, 22 Apr 2018 02:16:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/tiK0PB6Nbba1V+3Hs12y5eTjy6y4KHi4OZsTgw1wenhP3CEsQkuj6rtYzMQDxwHNnv/Z7 X-Received: by 2002:a17:902:9a8b:: with SMTP id w11-v6mr16621356plp.75.1524388582818; Sun, 22 Apr 2018 02:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388582; cv=none; d=google.com; s=arc-20160816; b=dJ10bG+irMVmzpJkGGjQzwoDlx+jeUBKjCl1QMYEY/GK/+AkWNIrguCGn3rSwfhHlT MVZlokUC8FJWB3wbsoyNKeQwifYVDc+dIqFLvK+GxMiIhszkNM2ENc04nPZM33qenIqX gJgXmVBzX1MdcUgSUU/iB2ROFQt77U+NnRg4AbY9gXtasOtAlyeTO0F62GObBLqm0UIO JoEh3AmPe5ez0qhbwKVyFQ9ABKo1BsNjjln3WytKnLEG11FFS6Y78lWAWcC39kZ/lrGz 4/DKRyZrL8auApTBViAdln7nAw0Ibhr63jT1MkVUcPDIBliSN8o/Eh+HRNTwM+iPsi4U fQ5w== 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=je7nUOYV+DEzEoMtiGtXG3dZ04Ytvb8SUUgw2B4Rx0Y=; b=al0IXZXIOIYMWUSS9Ff2NHUiNwNxXrx9KMecYztDxw++QrlDKSRB+8FKPNTEGNFDql Wl8AJPLA576oPH6ZTxTASOu/sejEfHKJb5fWX4WMvEecpxKy1NcPGXRMk/pl3xp20NTE 5nLwiD5mUFJanCzMRCvHjbHaX/FAMRsTFwDLnhAu7kWKoE+GAnC1IV/rECMCsm29KMcQ aj83NwxOBupbnuWB+PsIPFgyzZZW+vwf9VhG2IcsvT8tWGL1AJOPb2fTxizeiuD8cKxU 8UW14VHNwkOpf2zOuco5Vz7IBpF5q4TWuTl64JYZO4s3P0X4EAOcpyRpMxE+hLT3yy03 Jbeg== 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 m16-v6si6478029pli.590.2018.04.22.02.15.55; Sun, 22 Apr 2018 02:16:22 -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 S1752548AbeDVJOZ (ORCPT + 99 others); Sun, 22 Apr 2018 05:14:25 -0400 Received: from sauhun.de ([88.99.104.3]:37624 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbeDVJOV (ORCPT ); Sun, 22 Apr 2018 05:14:21 -0400 Received: from localhost (p5486C379.dip0.t-ipconnect.de [84.134.195.121]) by pokefinder.org (Postfix) with ESMTPSA id 2D3033274FD; Sun, 22 Apr 2018 11:14:20 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Dan Williams , Vinod Koul , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] dmaengine: txx9dmac: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:14 +0200 Message-Id: <20180422091415.7587-7-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/txx9dmac.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 4d8c7b9078fd..eb45af71d3a3 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c @@ -1244,8 +1244,7 @@ static void txx9dmac_shutdown(struct platform_device *pdev) static int txx9dmac_suspend_noirq(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); + struct txx9dmac_dev *ddev = dev_get_drvdata(dev); txx9dmac_off(ddev); return 0; @@ -1253,9 +1252,8 @@ static int txx9dmac_suspend_noirq(struct device *dev) static int txx9dmac_resume_noirq(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); - struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev); + struct txx9dmac_dev *ddev = dev_get_drvdata(dev); + struct txx9dmac_platform_data *pdata = dev_get_platdata(dev); u32 mcr; mcr = TXX9_DMA_MCR_MSTEN | MCR_LE; -- 2.11.0