Skip to content

Commit edc24de

Browse files
committed
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>
2 parents db967cf + 21e5a2d commit edc24de

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Documentation/devicetree/bindings/sram/sram.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ patternProperties:
9494
- samsung,exynos4210-sysram
9595
- samsung,exynos4210-sysram-ns
9696
- socionext,milbeaut-smp-sram
97+
- stericsson,u8500-esram
9798

9899
reg:
99100
description:

drivers/misc/sram.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,11 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
235235
goto err_chunks;
236236
}
237237
if (!label)
238-
label = child->name;
239-
240-
block->label = devm_kstrdup(sram->dev,
241-
label, GFP_KERNEL);
238+
block->label = devm_kasprintf(sram->dev, GFP_KERNEL,
239+
"%s", dev_name(sram->dev));
240+
else
241+
block->label = devm_kstrdup(sram->dev,
242+
label, GFP_KERNEL);
242243
if (!block->label) {
243244
ret = -ENOMEM;
244245
goto err_chunks;

0 commit comments

Comments
 (0)