Re: [PATCH v3 3/3] nvmem: rmem: Use NVMEM_DEVID_AUTO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 20/04/2023 13:29, Ivan T. Ivanov wrote:
From: Phil Elwell <phil@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
Signed-off-by: Ivan T. Ivanov <iivanov@xxxxxxx>
---


Applied thanks,

--srini

  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;



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux