Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3286563yba; Tue, 23 Apr 2019 00:43:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvFHjfhkcy6DtcWlwcPVINoufgzHxMberYuw4/3yD/WN4HaNnJtgQhNHKyRemijGAmZRER X-Received: by 2002:a17:902:e48f:: with SMTP id cj15mr24790909plb.256.1556005423733; Tue, 23 Apr 2019 00:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005423; cv=none; d=google.com; s=arc-20160816; b=Nj2WfDt/0YqDECL45z20ZaQASTBkVWhvgftUBl9IkDcpIj1GGgk7tM+LURtWU1S076 XWImHo4JKbJErqmlQ2o6XS3lWKI3pIIipIwEYv9zMRtOKnlhNH/wnBJBtdJKSHjtAiV/ JK9DDM1q0Xogn5hFxSVYpRENaifcIIQhmAzd7XYVZJVfgI7yMvJSBMmIYTjExo0gueX+ g+YtTUa+V8YFoIZ+C6irregU33eMl8luODhILIOcDatDcB1wKoALehMA38ucGIZkIJyz wjpt1+ddq9ZoyV2hgNs/O/rAsEOdKGKMYnfbL6WHiNK4dAMOaAkpzcOcgqPGmnKtjyJR yqFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6PBdN2srRFdFmwHDEnEVE43/xb5wU/dlM1g61cHXMOk=; b=YztbMu987KAkFhyG8CgO4HPKFoAo2IZE8necnVfLnGENY9T8yQ2SLRvs6tKSJuVW8v 5pqtgWaQuHF1O8tSqWQDWsQ0TL9w+WRALwAH9lACyRmvx7osobpBWuWutPCiZfQE3AQe P27H4FvqQf0vC1OrhZQkq3hmAYE2VO/TfSn7ESSI85DxGfJf+CLxV1APt+7dbmreGhLb rBYlUubOPBdILH6aCBfEgEW59Hb0JVOU28UDf1sH6264lxf7RB2IW78LI6frbRyufsa2 6HaPBWr74sIzUHpIc6MaizP1kk/+gkuB0XiWfphFwrOcEriBsu614kNgBL2zHkxV1UBG q4YQ== 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 w125si16471839pfw.137.2019.04.23.00.43.28; Tue, 23 Apr 2019 00:43:43 -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 S1726976AbfDWHk7 (ORCPT + 99 others); Tue, 23 Apr 2019 03:40:59 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7228 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726718AbfDWHkZ (ORCPT ); Tue, 23 Apr 2019 03:40:25 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 534EB15614CA2AE89A38; Tue, 23 Apr 2019 15:40:22 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:13 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , "David S. Miller" , Subject: [PATCH next 19/25] net: calxedaxgmac: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:14 +0800 Message-ID: <20190423075020.173734-20-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/net/ethernet/calxeda/xgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 13741ee49b9b..a71390c7c9de 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c @@ -1866,7 +1866,7 @@ static void xgmac_pmt(void __iomem *ioaddr, unsigned long mode) static int xgmac_suspend(struct device *dev) { - struct net_device *ndev = platform_get_drvdata(to_platform_device(dev)); + struct net_device *ndev = dev_get_drvdata(dev); struct xgmac_priv *priv = netdev_priv(ndev); u32 value; @@ -1892,7 +1892,7 @@ static int xgmac_suspend(struct device *dev) static int xgmac_resume(struct device *dev) { - struct net_device *ndev = platform_get_drvdata(to_platform_device(dev)); + struct net_device *ndev = dev_get_drvdata(dev); struct xgmac_priv *priv = netdev_priv(ndev); void __iomem *ioaddr = priv->base; -- 2.20.1