Received: by 10.192.165.156 with SMTP id m28csp772100imm; Thu, 19 Apr 2018 07:20:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/sfQjblExIHWKWBJpLGSk7RtRmExZqm5T2QZBQTI93gACN08GvxGkEUv5SxvbumAabeqnN X-Received: by 10.101.64.201 with SMTP id u9mr5433431pgp.142.1524147602855; Thu, 19 Apr 2018 07:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147602; cv=none; d=google.com; s=arc-20160816; b=FlvFR0SoWhKIaAmgKt7w5mS+CwU+sJ2R/uI1b4WMd78vTuGZHlVlzH9D1QZ5+E4eWi jYMNvYPXyw9lRD9ZcxIQ94LhmQtxAIFExAlTx7Leds/NC72d8WogCFUOmRG1ZalkwAx+ gfvWOpCzptODiFaJ+MXJcfCm0rH8i1+aBCnumvppflVnxYokSTxEtKjidGH5ovupCjkB ZwQ1bPGSb7QTzd6Mkc3EjJ9yX/F8oEzMluzjT9sL+CqycX2OCvfSXXBjGlenInW2Epo9 /kQL7sQ8T22SlNB+IjwCwO/6iRfP6/WuX6pYEPrJjvu7IWa8kif+yeACoYHXZSKuh8rL +clA== 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=NgQNKQSUUezFSTWEl/1jfltInWVC6M1BXrqwiGvO8fs=; b=imEu+qKrzz89/8keu4FeAQ3LQTMkI/crl1I1Wq0fEvCxpmFPD/BlAWPrLQTbObQvAQ 2IPxSYLISnWUZbRp4OERMXUWkyxVtJ6R5E9z6cvyfQ17y/PuJ66ALjI2T9Pcy+XJIz5k zPpxcwqs24T/jTLmOKaUPlEHhZnGeUXk/17hCvRrEZzbPjSV00CkIILS8ztvF+2u9bAG bVrt8rlvIKeVPaXYEugKWguoYoXO/gyfvQFdPhNmZK35aqgF9aiIsQp+QNhasutAW825 K6ruMFO15UzpNZ/r4tLB1pIw/VeZMV17R/HBoCoM8fmzlMuV4hTfWaeAjfQYPT83IcPG Ep8g== 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 t76si3020521pgc.627.2018.04.19.07.19.48; Thu, 19 Apr 2018 07:20:02 -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 S1753784AbeDSORa (ORCPT + 99 others); Thu, 19 Apr 2018 10:17:30 -0400 Received: from sauhun.de ([88.99.104.3]:45416 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753465AbeDSOHE (ORCPT ); Thu, 19 Apr 2018 10:07:04 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 1EFF03139CD; Thu, 19 Apr 2018 16:07:03 +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 , Nicolas Pitre , netdev@vger.kernel.org Subject: [PATCH 34/61] net: ethernet: smsc: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:04 +0200 Message-Id: <20180419140641.27926-35-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/smsc/smc91x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 080428762858..3e84a499fe92 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2453,8 +2453,7 @@ static int smc_drv_remove(struct platform_device *pdev) static int smc_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); if (ndev) { if (netif_running(ndev)) { -- 2.11.0