[PATCH 1/4] nvmem: rmem: get, don't request, memory region
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jun 8 22:43:39 PDT 2022
nvmem-rmem is a compatible for reserved memory entries, so the driver
can't expect exclusive access to this region.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/nvmem/rmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c
index cd735e5ef39d..b9331f48ffac 100644
--- a/drivers/nvmem/rmem.c
+++ b/drivers/nvmem/rmem.c
@@ -31,7 +31,7 @@ static int rmem_probe(struct device_d *dev)
struct resource *mem;
struct rmem *priv;
- mem = dev_request_mem_resource(dev, 0);
+ mem = dev_get_resource(dev, IORESOURCE_MEM, 0);
if (IS_ERR(mem))
return PTR_ERR(mem);
--
2.30.2
More information about the barebox
mailing list