Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1694528pxb; Mon, 20 Sep 2021 03:06:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpBo5KkIP/3m4MhMG398aSdchwNjvmA9Uwr7tCb6D+W4o5+19a5gYpHldArjhwqlneA/pG X-Received: by 2002:a17:907:98a5:: with SMTP id ju5mr25906309ejc.378.1632132381980; Mon, 20 Sep 2021 03:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632132381; cv=none; d=google.com; s=arc-20160816; b=NFWGxNqMxC3ArPQvqoSkLGJq5YU4EFiii7rCBdH4i8srU2P5TwVSscQP7K1oxouhg2 CvvBYpXOxft/9lhWGsVzLU1kSfajDaQ/KRmUo9lIPhSL3ishPUgwYrivr5MasElTmZbg AxEsS7HNt+lhKuB1RhnDync57SwSERu61S5sESiGXoJxbg2ALzELujXKL3EPdQhB0qMZ RMcnVxDN6UEuwd8tCqY8jITLZw7/HilUZtsX1fiFa7IoaVEzPP9Aw8ImUNNRbUUXUFHY SaVbQa50GCliMcxR9A/fcRv1V3KoG42fNAkIqxTSLtomqfhJdKi3ZaB6+U6kDRwbY9tS Un9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3ni/abAWa2abGAB3yJ1BGSoEehFqkNiDbaga4gB+IG4=; b=yR1cNRZJRNKdBGMGszd/SbN/z3Ge9k+UZUUN0ed3c6Zrgm4p1z6bm5iRfOKxkoXdz7 rMh4WUNneL4QBmoklg1PNn3r0tKbXqRUkEfjqCfAyxCFDcVPicfKLTRduOEzoVqDUe1M MYDTUEWC11IDqNQJcNTLtUiBp4WNcFvYL6TrwaaLDxXxVL5H+lf87bR/8EOK2RMu7dGC e3X3Y+Kqbai8fGmWFrAYPJm6At6rxtS3kkZYwi6ANyFo9UcuqaoWM6IQkrPfOSCEYNiM G88JBkLkn09zUsIlY3AHUJEv8mS+YiQAFvD1PPn6fcAwk5BCCC00WEK6zWUOpBu25y0Y HDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=WVT+ZD4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de12si14782324edb.352.2021.09.20.03.05.49; Mon, 20 Sep 2021 03:06:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=WVT+ZD4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236386AbhITJIa (ORCPT + 99 others); Mon, 20 Sep 2021 05:08:30 -0400 Received: from www.zeus03.de ([194.117.254.33]:54420 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236080AbhITJHX (ORCPT ); Mon, 20 Sep 2021 05:07:23 -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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; -- 2.30.2