From patchwork Tue Nov 13 14:01:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10680751 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 B385814E2 for ; Tue, 13 Nov 2018 14:04:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1A372094F for ; Tue, 13 Nov 2018 14:04:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9587528684; Tue, 13 Nov 2018 14:04:35 +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 46CDF2094F for ; Tue, 13 Nov 2018 14:04:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387885AbeKNAAc (ORCPT ); Tue, 13 Nov 2018 19:00:32 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36581 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387882AbeKNAAb (ORCPT ); Tue, 13 Nov 2018 19:00:31 -0500 Received: by mail-wm1-f68.google.com with SMTP id s11so2181592wmh.1 for ; Tue, 13 Nov 2018 06:02:14 -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=Wc5Df3TA4f94uLSsVA/a5jHyDSL54/2MBnBTB6cxEnk=; b=1vYYzEVMAGadRKLT0RQ86f6NaJeDBQdRo5PcIQW+gjQaEMORE5p4BmSYnozx2+bm01 Q2CjN2KqClhs3TvHGgbhYqzQXBryzHjpEVYV9sYA6qh5JjGG5V51d7dvn/OwjoJf7W0h Oa4OoBuyk4LpExaIlebw8tG81zlEMlBJ+qPS+KDG71vZtZIfZHyMc8wKG4ywI1oI9vSM aL3U5atBVGsibUiB+VAQqZZQcSrLbRRfNw1X+If+93zWPfsBjLFSbKNldeD47SVTv3Z7 6W42HFENmnRdP/h6KFZzTdTQjdgNiBU4isB59h9pougLYIerBRIyB+YEzk4MQIefVS7g bnfg== 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=Wc5Df3TA4f94uLSsVA/a5jHyDSL54/2MBnBTB6cxEnk=; b=UYqxB4HPUFMsrzggi80exlttgPaea0/HpyQAsZQVMnE1IvN9DK7W5y98tnHdfYTBBr f92xTtG8skyPcA0qdTgs/BT9cxpU9LMP876mH13gGq2LbOHEiW4nJKZqW+cZwIoh5LU5 Vxaw0h5UZ+QVQgnRCbtIjoimziu2TNe1wcQox26owMoU/BvVg5A3zIjvf/4ym4tKTJ6G MRA8zom6/fLLyApXQmheR/xmfVbC8uDO1g67PM6hkZETcCOB/WkLAuWAiTJocz6axQ2V whRa+dIFY1kclaiP9+aOWlvfYghOVk6GhJPMoxMN3YqF+qzW4J8Uu1u8QZoGg5W7c6AH 8kBg== X-Gm-Message-State: AGRZ1gI0zzC84ZUleqQUTS9/xLLCThGmlGQIVkfRPuOAT0cLZweLpzMu xGiTtAALE50lerO0PqOPFgdTfQ== X-Google-Smtp-Source: AJdET5eCneZzsonjCIJKb/v0cfrebw9r5UEFvH3gsPSan+oKyRzFwJATmLjnp+gyJK9zwU1UItgv/w== X-Received: by 2002:a1c:f30b:: with SMTP id q11-v6mr3301060wmq.45.1542117733498; Tue, 13 Nov 2018 06:02:13 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id m69-v6sm16604122wmb.8.2018.11.13.06.02.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:12 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Nicolas Ferre , "David S . Miller" , Grygorii Strashko , Srinivas Kandagatla , Andrew Lunn , Florian Fainelli , Rob Herring , Frank Rowand , Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 11/25] net: cadence: switch to using nvmem_get_mac_address() Date: Tue, 13 Nov 2018 15:01:19 +0100 Message-Id: <20181113140133.17385-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181113140133.17385-1-brgl@bgdev.pl> References: <20181113140133.17385-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;