Received: by 10.192.165.156 with SMTP id m28csp781117imm; Thu, 19 Apr 2018 07:28:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+SJvSkWG4LgxwtTxseSiKxWJDvsI4zRBur3AEx1I61esrhYRE91Fd6Hy8cgkfsklEwMCa0 X-Received: by 10.99.152.26 with SMTP id q26mr2725343pgd.40.1524148122232; Thu, 19 Apr 2018 07:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148122; cv=none; d=google.com; s=arc-20160816; b=WlO5EQ6LWm5O99dqQcYIKI7OXHvD5Os8rmnWYplZgWCUmrwhvRNrT7nqwYNLNcBJ72 5iTRjsX7Hd+R8K4Yl3OjIOk9EmuBG1SnsPAk1X0vdGlIRGDVY7hAQBiVv0WRu0PbCVco WDbwIP+7smA84GcPRmLl9WmcjtLJT2yr3Nx7g8FeckgrGKHcis5dgGwmCwZjoF3bFg5X lZuDvi/6jPTB17CYSTQxdIcbjOUX3nPaaXlGFGlLkEr3t+Y7B+du1eatmcRIL21YAL3d CSqm4WDhIDNhgR4he/NswwwG4J4U4CNmQWxwjIMSPXGIXF3N0ai8L+jy7bwJZlanHxy5 Bm1g== 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=U4vDvrvC+MimroaOTJinUkeSWUZGj0yehVb4miCnVz0=; b=byirZG8ytdJ5dAK69ZcX7NMfMx8TxEb6bjl7J29qMfih9vsIu9kSZDYQP5JI7vs4bT xPNlpLOjm86zrpjN25HYnFYOjiN7q58Dt6mdkGu7p6UoQ7Jrom+sPVRJvtVkrOF3cBJ4 WPMY2Qrj/4kxAQMhCF+QVDtVdF0Cve8JVf2AqXtPRHpAPZSKgZn5a8itPWukgHQNGeFx zHVVOaqvtCeL7cqcbAwDCMUbu6u8YFpjHaIyUC+1ieibvBz8C+XYp7MtwV6LJEYz9mnn 5wd+emJQXm/MrVvrCiOV4/B3ZbajnCVjY/5AR2DfE1w2dmMlYDhdrf31Tf2LvQEqSUlX JqMw== 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 v2si3125610pgf.75.2018.04.19.07.28.28; Thu, 19 Apr 2018 07:28:42 -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 S1753341AbeDSO1N (ORCPT + 99 others); Thu, 19 Apr 2018 10:27:13 -0400 Received: from sauhun.de ([88.99.104.3]:45272 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbeDSOGw (ORCPT ); Thu, 19 Apr 2018 10:06:52 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id DDE503139B2; Thu, 19 Apr 2018 16:06:49 +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 , Krzysztof Kozlowski , Herbert Xu , "David S. Miller" , Kukjin Kim , Jamie Iles , linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/61] crypto: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:36 +0200 Message-Id: <20180419140641.27926-7-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/crypto/exynos-rng.c | 6 ++---- drivers/crypto/picoxcell_crypto.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c index 86f5f459762e..2cfabb99cb6e 100644 --- a/drivers/crypto/exynos-rng.c +++ b/drivers/crypto/exynos-rng.c @@ -319,8 +319,7 @@ static int exynos_rng_remove(struct platform_device *pdev) static int __maybe_unused exynos_rng_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct exynos_rng_dev *rng = platform_get_drvdata(pdev); + struct exynos_rng_dev *rng = dev_get_drvdata(dev); int ret; /* If we were never seeded then after resume it will be the same */ @@ -350,8 +349,7 @@ static int __maybe_unused exynos_rng_suspend(struct device *dev) static int __maybe_unused exynos_rng_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct exynos_rng_dev *rng = platform_get_drvdata(pdev); + struct exynos_rng_dev *rng = dev_get_drvdata(dev); int ret; /* Never seeded so nothing to do */ diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index a4df966adbf6..321d5e2ac833 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1169,8 +1169,7 @@ static void spacc_spacc_complete(unsigned long data) #ifdef CONFIG_PM static int spacc_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct spacc_engine *engine = platform_get_drvdata(pdev); + struct spacc_engine *engine = dev_get_drvdata(dev); /* * We only support standby mode. All we have to do is gate the clock to @@ -1184,8 +1183,7 @@ static int spacc_suspend(struct device *dev) static int spacc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct spacc_engine *engine = platform_get_drvdata(pdev); + struct spacc_engine *engine = dev_get_drvdata(dev); return clk_enable(engine->clk); } -- 2.11.0