Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5402115imu; Tue, 13 Nov 2018 06:07:52 -0800 (PST) X-Google-Smtp-Source: AJdET5fKrGRHCKOVBGsrsGbFX+i8VRDKXRlUavmeb+5eiIHAasXPhL5kLbXCpS4R+8VeXD0Vs0ZN X-Received: by 2002:a17:902:e081:: with SMTP id cb1-v6mr5202705plb.206.1542118072300; Tue, 13 Nov 2018 06:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542118072; cv=none; d=google.com; s=arc-20160816; b=Hz9GChM+M3NrLek3/8t1F1BN6R85yrhr7kFc9bI5Nuvi0JziVj5qAI9ywrvoPTypT+ axAuEVqlBoNUa6hNElRV9W5IVQ2xX/hkZCp+AWWJ4trTJRXquBgLNfG0GVW9gjh/7b7U 0tJbHqWT7Lof5OUwWk664Ktgjzm25lh7LXLAgg0fFwIBAPRR1B2zHyEtoWuU5wpFb5SM qktw4SFqx5lKFf9vZvi696e1DRXmfd7ZHsSVBit2UFcSWTQd9YubQyOj+fd1++/ymSkW CrVGC+Ybt/fy427dlGrq44rEZNzOkckWrmz34blldKa/b6JV69HzmN08OOTGIkRCfB/8 xFUQ== 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 :dkim-signature; bh=Wc5Df3TA4f94uLSsVA/a5jHyDSL54/2MBnBTB6cxEnk=; b=BNtLCs0xUx14Xxs6qgxs9l1QY242tL4VihZWaJA4qE/jYAviQjQHkn6oGOBNSy7OQT dYoiJ5rRQTtIUvJZfum/N8UXkViYexcqOfjNonWI9S3AQmdN7bg7Ht63pc0n0kYO0ywH jvgQLCDOhhQC5WvTa/Uja0z6i2UXOHcKjvopEOOTPweBaF9dayT/RT9wBimjcJvoiG1T +amftprsK8iqH1hLj1zlYC3fU5vqznkzYhOtuzJLx1pj43v7nuKkdQlDwfpjHTUDA8gs 90Pgq5RP4ht7OWOIyH6p9fdDkQauBDH3sjuUkMD5mIuE7tB+skQ4Bz5f2Wjs8vV40T1S wlUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=1vYYzEVM; 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 l11-v6si21162637plt.5.2018.11.13.06.07.27; Tue, 13 Nov 2018 06:07:52 -0800 (PST) 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=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=1vYYzEVM; 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 S2387897AbeKNAAc (ORCPT + 99 others); Tue, 13 Nov 2018 19:00:32 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54658 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387883AbeKNAAb (ORCPT ); Tue, 13 Nov 2018 19:00:31 -0500 Received: by mail-wm1-f67.google.com with SMTP id r63-v6so12089949wma.4 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=MnbzXVacZyNWR5U6Ok31YoNopGoSWXwjdcUVoXn5nQaBlf0tweaKItmVBJAEfT6/vZ GNUCYnMxKOnf+VHCwrKzeG1G+dCVTlWJAgsEESd6scg+R7Uu6A3c3uyl6O+6UrOYk8CE TaZCSK5YO0D29hp/7Zdi2cFveaa1D2/EDXqNMbvAjVSqaFWvi8nlrAv8hND7Z+R6L5Eb SHn9e38KfXzIjqkhYhAcAGD7Qdl5GKY2UUsmszzGmll/MBmlc3XdGGXthtw4jsR0g5T8 iE8CuWGWix9uDnxjiZpjTXXGR9WN/YsRUqb276bwaEK8Z14sZ2Ji151DeK/37Ge5B7Rt 82sw== X-Gm-Message-State: AGRZ1gJfmvU6+jNDIwtQicGA5+dEP+bOYkHElbBy1BYJM9gjLqzYpvjc shvIm+WN4hUm1Q5xuoS2ucURYg== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.19.1