Received: by 10.192.165.156 with SMTP id m28csp780231imm; Thu, 19 Apr 2018 07:27:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+dcsJu0tp0p+FP8clr7KnHZP8KyKAdxVKuDXLH5BuSCDY8eot/vsRt0GSge5GxhndM8LZS X-Received: by 10.98.80.80 with SMTP id e77mr6139637pfb.16.1524148069230; Thu, 19 Apr 2018 07:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148069; cv=none; d=google.com; s=arc-20160816; b=pn3GB6X1FiGyX76Oq4HnJN31HURPweu6wUFGHTy/kvfH0AdhAJkZW125yNG/8qW62I p5aIMEVfTHmCu4vkM3ZB5cPNnNHRsfFSkOB7nhrmHrQIqQEt2aUGgWJu0Ce9OMxOVRV5 zOoIFA+z99NbjhqQC5yh8Cr9hh82up1edgWj0H/yCTtBaTS136b+Gg/mGsW9hJIqW05a PVDnhXF+tnMDzrtWoUSmGzr+0cPXJFBEXRA3UPHoUdIMjv+LydaTnAFj0sthxKVKFMRc uP4DmzJ9YPkgwRXh+DoTXKBLpI38JMkd5nqcBRm7jpS366s4a9Pwh3sRp+q20fY1+LOG TZsQ== 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=6MTEWx9eJoI3mda1mu4YgLsHG2riFEo+6+mneLk+GgU=; b=YqwvWOmM/QVhPWDV0PVG54ZJFuqIMyonqdIBYX4ZUdPz5e+d+jdShRtanvDcZ5oHME ObaL3QnANER7lxciErrzqyG2zi7a7Y3TR+TUoUpyGekiARijHZ0cmVginC249RTvVNpY LYTAesUk9+dE/hXzmjj6DGBg7l26PrHyLEdr9o322+PGneUiKd7QIQ/lsSug0+V56OO3 XBLsIIBM23MIaKpW+w/QL3mYlGoSTqISEGpNcydnyqlJtJesK9F49jtzJ3nEznxjkV1t VapL64R93B0T/5GJ2K56IuHLomnKPKK6Y6ay7dBMKIQGkXe+f5cVdRBkdSmat3qUZk2V Mseg== 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 t76si3020521pgc.627.2018.04.19.07.27.35; Thu, 19 Apr 2018 07:27:49 -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 S1753411AbeDSO0g (ORCPT + 99 others); Thu, 19 Apr 2018 10:26:36 -0400 Received: from sauhun.de ([88.99.104.3]:45294 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753072AbeDSOGw (ORCPT ); Thu, 19 Apr 2018 10:06:52 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id EC20A3139B4; Thu, 19 Apr 2018 16:06:50 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Viresh Kumar , Andy Shevchenko , Dan Williams , Vinod Koul , dmaengine@vger.kernel.org Subject: [PATCH 08/61] dmaengine: dw: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:38 +0200 Message-Id: <20180419140641.27926-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-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 individually. drivers/dma/dw/platform.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index bc31fe802061..f62dd0944908 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c @@ -293,8 +293,7 @@ MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table); static int dw_suspend_late(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct dw_dma_chip *chip = platform_get_drvdata(pdev); + struct dw_dma_chip *chip = dev_get_drvdata(dev); dw_dma_disable(chip); clk_disable_unprepare(chip->clk); @@ -304,8 +303,7 @@ static int dw_suspend_late(struct device *dev) static int dw_resume_early(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct dw_dma_chip *chip = platform_get_drvdata(pdev); + struct dw_dma_chip *chip = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(chip->clk); -- 2.11.0