From patchwork Mon Sep 20 09:05:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72635C4332F for ; Mon, 20 Sep 2021 09:06:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55AD461077 for ; Mon, 20 Sep 2021 09:06:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236117AbhITJHa (ORCPT ); Mon, 20 Sep 2021 05:07:30 -0400 Received: from www.zeus03.de ([194.117.254.33]:54438 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236167AbhITJH0 (ORCPT ); Mon, 20 Sep 2021 05:07:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=kelsYgr6SqHCfz FaSr+5PxcTB7+QvINlURnRo2qpgTs=; b=WVT+ZD4sJBq7gWM4rlglzY+jwq1feC Iv+PxhjP77o6WHe8V1AE1WeSnpTMxxH4gZyg7m78AmfkaUzT11/C8u064DZyslkK s1MWTEuxCq4WxVzg6GcQstBpo5kj8gK7k4DuaFdSR3dnjR0AOTw6or9YZYdiICKr yjaOJR6+/zymY= Received: (qmail 2412787 invoked from network); 20 Sep 2021 11:05:28 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:28 +0200 X-UD-Smtp-Session: l3s3148p1@zvcMlWnMGIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Ohad Ben-Cohen , Bjorn Andersson , Mathieu Poirier , linux-remoteproc@vger.kernel.org Subject: [PATCH 9/9] remoteproc: omap_remoteproc: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:21 +0200 Message-Id: <20210920090522.23784-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org We should get 'driver_data' 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. drivers/remoteproc/omap_remoteproc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 43531caa1959..32a588fefbdc 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -901,8 +901,7 @@ static int _omap_rproc_resume(struct rproc *rproc, bool auto_suspend) static int __maybe_unused omap_rproc_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct rproc *rproc = platform_get_drvdata(pdev); + struct rproc *rproc = dev_get_drvdata(dev); struct omap_rproc *oproc = rproc->priv; int ret = 0; @@ -938,8 +937,7 @@ static int __maybe_unused omap_rproc_suspend(struct device *dev) static int __maybe_unused omap_rproc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct rproc *rproc = platform_get_drvdata(pdev); + struct rproc *rproc = dev_get_drvdata(dev); struct omap_rproc *oproc = rproc->priv; int ret = 0;