Skip to content

Commit

Permalink
nvmem: Do not expect fixed layouts to grab a layout driver
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
miquelraynal authored and gregkh committed Dec 7, 2023
1 parent 1a031f6 commit b7c1e53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/nvmem/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,12 @@ static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
if (!layout_np)
return NULL;

/* Fixed layouts don't have a matching driver */
if (of_device_is_compatible(layout_np, "fixed-layout")) {
of_node_put(layout_np);
return NULL;
}

/*
* In case the nvmem device was built-in while the layout was built as a
* module, we shall manually request the layout driver loading otherwise
Expand Down

0 comments on commit b7c1e53

Please sign in to comment.