devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov@suse.de>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Nicolas Saenz Julienne <nsaenz@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Stefan Wahren <stefan.wahren@i2se.com>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Phil Elwell <phil@raspberrypi.com>,
	"Ivan T . Ivanov" <iivanov@suse.de>
Subject: [PATCH v3 3/3] nvmem: rmem: Use NVMEM_DEVID_AUTO
Date: Thu, 20 Apr 2023 15:29:24 +0300	[thread overview]
Message-ID: <20230420122924.37997-4-iivanov@suse.de> (raw)
In-Reply-To: <20230420122924.37997-1-iivanov@suse.de>

From: Phil Elwell <phil@raspberrypi.com>

It is reasonable to declare multiple nvmem blocks. Unless a unique 'id'
is passed in for each block there may be name clashes.

Avoid this by using the magic token NVMEM_DEVID_AUTO.

Fixes: 5a3fa75a4d9cb ("nvmem: Add driver to expose reserved memory as nvmem")

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
---
 drivers/nvmem/rmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c
index 80cb187f1481..752d0bf4445e 100644
--- a/drivers/nvmem/rmem.c
+++ b/drivers/nvmem/rmem.c
@@ -71,6 +71,7 @@ static int rmem_probe(struct platform_device *pdev)
 	config.dev = dev;
 	config.priv = priv;
 	config.name = "rmem";
+	config.id = NVMEM_DEVID_AUTO;
 	config.size = mem->size;
 	config.reg_read = rmem_read;
 
-- 
2.35.3


  parent reply	other threads:[~2023-04-20 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 12:29 [PATCH v3 0/3] Add nvmem node for BCM2711 bootloader public key Ivan T. Ivanov
2023-04-20 12:29 ` [PATCH v3 1/3] dt-bindings: nvmem: rmem: Add raspberrypi,bootloader-public-key Ivan T. Ivanov
2023-04-21  7:56   ` Krzysztof Kozlowski
2023-05-12 10:20   ` Srinivas Kandagatla
2023-04-20 12:29 ` [PATCH v3 2/3] ARM: dts: Add nvmem node for BCM2711 bootloader public key Ivan T. Ivanov
2023-04-21  7:55   ` Krzysztof Kozlowski
2023-04-21  7:59     ` Tim Gover
2023-04-25 16:02   ` Stefan Wahren
2023-04-25 16:24     ` Tim Gover
2023-05-18 11:56   ` Ivan T . Ivanov
2023-04-20 12:29 ` Ivan T. Ivanov [this message]
2023-05-12 10:21   ` [PATCH v3 3/3] nvmem: rmem: Use NVMEM_DEVID_AUTO Srinivas Kandagatla
2023-04-25 16:33 ` [PATCH v3 0/3] Add nvmem node for BCM2711 bootloader public key Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230420122924.37997-4-iivanov@suse.de \
    --to=iivanov@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=nsaenz@kernel.org \
    --cc=phil@raspberrypi.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).