Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9456056ybi; Wed, 24 Jul 2019 04:27:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMkeGiaGpeOqY0yztjBSdfnjbTf3xapAelH6A8oLnK+JFXD6Wsw4tRWWUAC6/pSjjAFc+t X-Received: by 2002:a65:60d3:: with SMTP id r19mr55795463pgv.91.1563967674169; Wed, 24 Jul 2019 04:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563967674; cv=none; d=google.com; s=arc-20160816; b=Jjiyu71LM/2MJyIxy8UT7s2WYjNTOxjUO7+MqwxASatTGwNNYNs97eB6mWMzXIBhJN w+iqKkTh7wzoF4CsXAZYqhvrf9wotpPG2a5W7rqhn9yKivUbbXP7zPMvZ++qmeIh0LRR 1rTjJTwdgketzyzKVsHao1FUKPelvEc0qG1w+Z7Tqm9W/PHW15tXxXHN0i3ehcll6fPx vVLZBp8a43ujqWHzBelaKViXIDRzSmk7CL1bNHPr3xuv8z0/YTVGpKsbPaxtjLuVq3KD 8PBn8gOEZbpNyaYtQG1dblbjQ6G0MQVB1OnIjo7AHFwdrAuE+jzcXbyK4yW12tdVwIZY 5XrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=7rxIecE1+hcOWYBkK6fDvRfNcPOFXL9RSiYVbCBgkeA=; b=y8L8yHhw/9sedLLonNKyFgz9LpqbDyhSEiloDnHR4lnt6FuQQn1Pp6RcA3qbg3LsnY 5jCv2VrJFyfABlcOTQlJkhHUdNVshl5Hg+e4HjJal16XeVrRRqL6hc051KycO0rPER7p YR3MnpGazwcLRVOGPeS1IRgGBHKFyFpo3hFGKS+dyjx6Yq/aTZpwOASv1iddw6grHMes CPXDgPGxv1plvQUK6+OaUjn+m3DC6D6JcEohP2QZLZHAeIqKmgNcoYJFvw4Pl2HQY7F2 jfshCTvKW8vwVjnCm/8rdmqySKxdaTn0VtqQRzIh9ztwKAvOPM7IUi0xmqwMtiemGMdk rZsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qAALm67O; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r199si17977933pfr.233.2019.07.24.04.27.39; Wed, 24 Jul 2019 04:27:54 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qAALm67O; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbfGXL0y (ORCPT + 99 others); Wed, 24 Jul 2019 07:26:54 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35911 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726300AbfGXL0x (ORCPT ); Wed, 24 Jul 2019 07:26:53 -0400 Received: by mail-pf1-f194.google.com with SMTP id r7so20810938pfl.3; Wed, 24 Jul 2019 04:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7rxIecE1+hcOWYBkK6fDvRfNcPOFXL9RSiYVbCBgkeA=; b=qAALm67O+kCcLf4/HPKiSZjGsgoR/l31ZwmhZH5IPGarRAPjGvWxCFUnmZMisIPHAk cdRMwKkjX4KEIRrkaZKbrQOI58SaMZSkudT4VzMyjQ30XEC6P5zyWCBAu6UEQT82BK58 h6uJ/N6uGdMizz6GBZsU6Zn+dWO1BEbqMvz1CeSQG9y6WNnqjJQlE5oVfqIoGerduGFb H7CjhAfoPfd2rPTmgZc6quRB3+mlezxmi1YcerJ+C1YbHtr3nHpdwBdggHLtOYO+Trgj VAW2i7UpuI9Po8BjacnJrL4pctGgt/9wv9bquzTlju9++nX0vBf15JCpp5L2ErMN5Up0 VB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7rxIecE1+hcOWYBkK6fDvRfNcPOFXL9RSiYVbCBgkeA=; b=TSCT314SR3SAXum+mLICOJg2nvdfKui+QqaSvXQyOzqjQbCwJXOrJXVQqE8g775wTD 1C+K/oigzyMJX+Nmug4/CzV0++Vu+xWZ8VunUeKpqW2R3+KLIElgr9Q45jtHIvwBHZVx 4DYZtui07MGbGYUtAuvkmxUdxlhK4veBHxV2DREnVH6tcoCyNHdhMA+F+gZskDli5kYw ZDNdfdbtZmD1aZuw1FTMqVw9FJQzpvFTKCAPqpXsy8POOTUxcTn+Pj6mk2EUu+i119G3 TwBZ4W13kAJxnrQlVv7GoOc4nwDfj/cES4QDxWzZrPjg8dCglS86MfxBkhZZoe3d5G/H V+nA== X-Gm-Message-State: APjAAAU0sHO1d5MRcNYtbOQ48n6ZlbEhoTaV5axNzoDou6shUmAhYwqQ OH+PEcrc2ciEcZha0DAGUVHa64Edwjs= X-Received: by 2002:a63:d555:: with SMTP id v21mr58678772pgi.179.1563967612956; Wed, 24 Jul 2019 04:26:52 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id 4sm55761778pfc.92.2019.07.24.04.26.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 04:26:52 -0700 (PDT) From: Chuhong Yuan Cc: "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH net-next 02/10] forcedeth: Use dev_get_drvdata where possible Date: Wed, 24 Jul 2019 19:26:48 +0800 Message-Id: <20190724112648.13186-1-hslester96@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan --- drivers/net/ethernet/nvidia/forcedeth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index b327b29f5d57..ecca794c55e2 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c @@ -6126,8 +6126,7 @@ static void nv_remove(struct pci_dev *pci_dev) #ifdef CONFIG_PM_SLEEP static int nv_suspend(struct device *device) { - struct pci_dev *pdev = to_pci_dev(device); - struct net_device *dev = pci_get_drvdata(pdev); + struct net_device *dev = dev_get_drvdata(device); struct fe_priv *np = netdev_priv(dev); u8 __iomem *base = get_hwbase(dev); int i; -- 2.20.1