From: Phil Elwell Date: Sun, 11 Jun 2023 14:03:09 +0000 (+0100) Subject: nvmem: rmem: Use NVMEM_DEVID_AUTO X-Git-Tag: v6.6.17~4469^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09dd7b993eddb3b48634fd5ddf27aa799785a9ee;p=platform%2Fkernel%2Flinux-rpi.git nvmem: rmem: Use NVMEM_DEVID_AUTO 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: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem") Signed-off-by: Phil Elwell Signed-off-by: Ivan T. Ivanov Reviewed-by: Stefan Wahren Signed-off-by: Srinivas Kandagatla Message-ID: <20230611140330.154222-6-srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c index 80cb187f..752d0bf 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;