From patchwork Mon Sep 20 09:05:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504921 X-Patchwork-Delegate: kuba@kernel.org 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=unavailable 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 D808EC433FE for ; Mon, 20 Sep 2021 09:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3A4860F58 for ; Mon, 20 Sep 2021 09:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236251AbhITJIF (ORCPT ); Mon, 20 Sep 2021 05:08:05 -0400 Received: from www.zeus03.de ([194.117.254.33]:54400 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236118AbhITJHT (ORCPT ); Mon, 20 Sep 2021 05:07:19 -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=GnB9PaNYAVWoSF sgf1jz7+etGw0c6Zs8IYhl8WXWXSE=; b=b+nWIIMq23r6AsaJWdNuPhfv4+LZg3 gna6Yftspr/xvq6bIxktV26mcxPy+kpBtPeqsy9MJ8xvJVrz0HGhe3p2jl8zMyGJ pygO1YxAdc9SU3lI2XjszJehRIRvgjfJGWLsRHVHyl9KfC8kxPM+edMfZg6phmiO D2KOM3q7TS6OA= Received: (qmail 2412743 invoked from network); 20 Sep 2021 11:05:27 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:27 +0200 X-UD-Smtp-Session: l3s3148p1@uof8lGnMFIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:19 +0200 Message-Id: <20210920090522.23784-8-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: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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/net/mdio/mdio-bcm-iproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c index 77fc970cdfde..5666cfab15b9 100644 --- a/drivers/net/mdio/mdio-bcm-iproc.c +++ b/drivers/net/mdio/mdio-bcm-iproc.c @@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int iproc_mdio_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct iproc_mdio_priv *priv = platform_get_drvdata(pdev); + struct iproc_mdio_priv *priv = dev_get_drvdata(dev); /* restore the mii clock configuration */ iproc_mdio_config_clk(priv->base);