aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-05-26 16:38:52 +0200
committerArnd Bergmann <arnd@arndb.de>2023-05-26 16:38:53 +0200
commitedc24de71648d500928ddf2d575cd2f3ae9f9103 (patch)
tree5e4ad4e384fc44bd7ad39ef8848df031e4da3c7d
parentarm-cci: add cci_enable_port_for_self prototype (diff)
parentmisc: sram: Generate unique names for subpools (diff)
downloadwireguard-linux-edc24de71648d500928ddf2d575cd2f3ae9f9103.tar.xz
wireguard-linux-edc24de71648d500928ddf2d575cd2f3ae9f9103.zip
Merge tag 'sram-for-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into soc/drivers
This fixes a small bug in the SRAM misc driver and adds a compatible for SRAMs to the SRAM bindings. * tag 'sram-for-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: misc: sram: Generate unique names for subpools dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAM Link: https://lore.kernel.org/r/CACRpkdbEQ7nTnJTj5WMtxvH057fDSbX5tNs5j4Y=5KSBMpa-Sw@mail.gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--Documentation/devicetree/bindings/sram/sram.yaml1
-rw-r--r--drivers/misc/sram.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 993430be355b..0922d1f71ba8 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -94,6 +94,7 @@ patternProperties:
- samsung,exynos4210-sysram
- samsung,exynos4210-sysram-ns
- socionext,milbeaut-smp-sram
+ - stericsson,u8500-esram
reg:
description:
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 99413310956b..5757adf418b1 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -235,10 +235,11 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
goto err_chunks;
}
if (!label)
- label = child->name;
-
- block->label = devm_kstrdup(sram->dev,
- label, GFP_KERNEL);
+ block->label = devm_kasprintf(sram->dev, GFP_KERNEL,
+ "%s", dev_name(sram->dev));
+ else
+ block->label = devm_kstrdup(sram->dev,
+ label, GFP_KERNEL);
if (!block->label) {
ret = -ENOMEM;
goto err_chunks;