From patchwork Fri Nov 30 08:20:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10705951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB73F13BF for ; Fri, 30 Nov 2018 08:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DFB32FBF1 for ; Fri, 30 Nov 2018 08:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91FB02FBFF; Fri, 30 Nov 2018 08:21:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A7822FBF1 for ; Fri, 30 Nov 2018 08:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726590AbeK3TaR (ORCPT ); Fri, 30 Nov 2018 14:30:17 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42706 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727038AbeK3T3v (ORCPT ); Fri, 30 Nov 2018 14:29:51 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so4370697wrx.9 for ; Fri, 30 Nov 2018 00:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lJyx3gFlIK2rFy1vMeWyk8uHK8wEfTaZ3rmQd4bUKx4=; b=Uylz24i3Z8nlWHeBua5/oHwAl1P6w3quwD9Ohz1BD7tzbovLsSPX9/gU9WLtYyEEMx S2tiG67UL2pbV869G763TIQKa2F1V5hz4g3yM3NodQngSVXkUEUXNi64u4KgufleykUi V8EkFPjKtwDZUujFd8RZ/M+CYn46fOZYOZln3gx4ejhJs/3oaDaNzuNwzMx5kmitOMhF DCtdNFV5jUmjMAh8UyXQ07tRoVqXvmenQluwTtOOTMtRQElRvJYSJUttk2zdyMfXg9lj Re3rhLZuC3nCllfCtphzsm90GDYQ9RRNlp6OSLov6GU249/RNbg61TtuBAMJsr77FpDl VL2w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=lJyx3gFlIK2rFy1vMeWyk8uHK8wEfTaZ3rmQd4bUKx4=; b=r8EJIo+jecMH93ieUJ4x4rpARqSvdG9DahyUGajZ7+B9smQMbO3MYDsINT8QrSepog 2cm/XE+JNEgRo938RlxJzbsQPqox/XxiLDE1e6KXcUxw3POGqR/Tg094r3Tm304zocdA JOB9TctWOVOS3qsQZ18uOJFRMmW0VUAspTslQcISXCyQ8ZjfB5TM62W7tT1wOv+qmh51 lBAnHZoghEiuWcG5Yogl6pZwd4eViz30YC3vjiKsWfEYwY0ODtsSqR4EiEBY1BOSUPNk 1hC9CrngEJOZXxNrNUBb3q6OzMHC+7xFChZhAyEVziy7hGgPnmECxDYUrPsrfi44AmII Qmfg== X-Gm-Message-State: AA+aEWanKsI4eBSafEBTZaNrVJAZNlY19u1+SQutX1r2bfoLrv9dTvkc VCbm4BPoAiHONPTNkvprN8TWIQ== X-Google-Smtp-Source: AFSGD/WEGYJST2pq6nf7GYDCkLFIHvejs7k2Oh5l/VtmBG8TP/pq/RFvdlPU9WEumMa0mH5hI9KRnQ== X-Received: by 2002:adf:cf0f:: with SMTP id o15mr4163625wrj.253.1543566079516; Fri, 30 Nov 2018 00:21:19 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id x197sm6473374wmd.2.2018.11.30.00.21.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 00:21:19 -0800 (PST) From: Bartosz Golaszewski To: Grygorii Strashko , Nicolas Ferre , "David S . Miller" , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Rob Herring , Frank Rowand , Sekhar Nori , Kevin Hilman Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-omap@vger.kernel.org, Bartosz Golaszewski Subject: [net-next][PATCH 2/4] net: cadence: switch to using nvmem_get_mac_address() Date: Fri, 30 Nov 2018 09:20:58 +0100 Message-Id: <20181130082100.6241-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181130082100.6241-1-brgl@bgdev.pl> References: <20181130082100.6241-1-brgl@bgdev.pl> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski We now have a generalized helper routine to read the MAC address from nvmem which takes struct device as argument. The nvmem subsystem will then try device tree first before all other potential providers. Signed-off-by: Bartosz Golaszewski Acked-by: Nicolas Ferre --- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 1d86b4d5645a..d9a208f7bb40 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4055,7 +4055,7 @@ static int macb_probe(struct platform_device *pdev) if (mac) { ether_addr_copy(bp->dev->dev_addr, mac); } else { - err = of_get_nvmem_mac_address(np, bp->dev->dev_addr); + err = nvmem_get_mac_address(&pdev->dev, bp->dev->dev_addr); if (err) { if (err == -EPROBE_DEFER) goto err_out_free_netdev;