Received: by 10.192.165.156 with SMTP id m28csp771368imm; Thu, 19 Apr 2018 07:19:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx49KeCQQhtxwGkqzlGQ0aELA8TLvc8ZeRn2hYSKyvMEKawPRN7NO4vo5fSIR0rr/upOQiqaw X-Received: by 2002:a17:902:1007:: with SMTP id b7-v6mr6291235pla.205.1524147557607; Thu, 19 Apr 2018 07:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147557; cv=none; d=google.com; s=arc-20160816; b=kiEy15VYQMH6rHuNSLeLiHlcU9mUfdOPrMb2sTmZanyXLXwMMBYvyDqArcHKKmU0ci iT+pfsML+/DqsEcl8nWOohJOxTSzCiHtx18hYZNkzXwSLmH7LzlHwL2w+ZnBpmuzZrV2 +exd/cqIu0JQqtLrwx1jOm7jmT5MblbFvUvOLeP7thpT8ZSIc7CbNb5KdhqgkP5uYwgo /eXUVlDxSrbMHkJL0EMjrwfMvLGmXbwzhxeB3hCfSCL+Ra6k+Xtj+845zWL847Ce+CQc UuoMxx/1spsm8asjsembTWWzclMD/tB2n3ImDiBuK7wzjOOFpljudEitFAGbsWdFL/iB O7Hg== 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=a0PMbkaYwRqoaHlqFnpv2x/ufFY4JtfOpPTJeYINXe8=; b=IBTONQlQculB7kjhRMvL5oH5U7TK1yRkKgKChaYI65WhSVXUO14fqjDU6PpPwUAI8R 9TyDXWP1CVFxnhAovznU96nQ1vFPMZSPt7gnVlkD9OyWSc80RDgktKm1XQ9yHfPqnE9R 91hnXTocdQCkLWgK+NKsP8rWwqUBG2+wPeEzLHFk04CI/K0YyX1TXKqrF2dhiTTE4ZTM Y0VuhYfmcUOXERH//RlavZaNvFc/GC1F7q1+PoQxygK4vfa+ufA2VPAUMjWYLnbVXpOx SbQaVMoaeGbdeDFX5QfKV5Ui6imJJG5wX4XRdrcuhyEXII6rS1oKOnRNzK6DnzCE8LvP kxhA== 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 c23-v6si3377277plo.80.2018.04.19.07.19.03; Thu, 19 Apr 2018 07:19:17 -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 S1753594AbeDSORw (ORCPT + 99 others); Thu, 19 Apr 2018 10:17:52 -0400 Received: from sauhun.de ([88.99.104.3]:45342 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753453AbeDSOHE (ORCPT ); Thu, 19 Apr 2018 10:07:04 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id AEC6F3139CC; Thu, 19 Apr 2018 16:07:02 +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 , netdev@vger.kernel.org Subject: [PATCH 33/61] net: ethernet: davicom: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:03 +0200 Message-Id: <20180419140641.27926-34-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/net/ethernet/davicom/dm9000.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index 50222b7b81f3..0a82fcf16d35 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c @@ -1722,8 +1722,7 @@ dm9000_probe(struct platform_device *pdev) static int dm9000_drv_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct net_device *ndev = platform_get_drvdata(pdev); + struct net_device *ndev = dev_get_drvdata(dev); struct board_info *db; if (ndev) { @@ -1745,8 +1744,7 @@ dm9000_drv_suspend(struct device *dev) static int dm9000_drv_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct net_device *ndev = platform_get_drvdata(pdev); + struct net_device *ndev = dev_get_drvdata(dev); struct board_info *db = netdev_priv(ndev); if (ndev) { -- 2.11.0