[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230611140330.154222-6-srinivas.kandagatla@linaro.org>
Date: Sun, 11 Jun 2023 15:03:09 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, Phil Elwell <phil@...pberrypi.com>,
"Ivan T . Ivanov" <iivanov@...e.de>,
Stefan Wahren <stefan.wahren@...e.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH 05/26] nvmem: rmem: Use NVMEM_DEVID_AUTO
From: Phil Elwell <phil@...pberrypi.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@...pberrypi.com>
Signed-off-by: Ivan T. Ivanov <iivanov@...e.de>
Reviewed-by: Stefan Wahren <stefan.wahren@...e.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
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.25.1
Powered by blists - more mailing lists