Skip to content

Commit b7c1e53

Browse files
miquelraynalgregkh
authored andcommitted
nvmem: Do not expect fixed layouts to grab a layout driver
Two series lived in parallel for some time, which led to this situation: - The nvmem-layout container is used for dynamic layouts - We now expect fixed layouts to also use the nvmem-layout container but this does not require any additional driver, the support is built-in the nvmem core. Ensure we don't refuse to probe for wrong reasons. Fixes: 27f699e ("nvmem: core: add support for fixed cells *layout*") Cc: [email protected] Reported-by: Luca Ceresoli <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Tested-by: Rafał Miłecki <[email protected]> Tested-by: Luca Ceresoli <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1a031f6 commit b7c1e53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/nvmem/core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,12 @@ static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
796796
if (!layout_np)
797797
return NULL;
798798

799+
/* Fixed layouts don't have a matching driver */
800+
if (of_device_is_compatible(layout_np, "fixed-layout")) {
801+
of_node_put(layout_np);
802+
return NULL;
803+
}
804+
799805
/*
800806
* In case the nvmem device was built-in while the layout was built as a
801807
* module, we shall manually request the layout driver loading otherwise

0 commit comments

Comments
 (0)