mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
nvmem: zynqmp_nvmem: unbreak driver after cleanup
Commit29be47fcd6("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") changed the driver to expect the device pointer to be passed as the "context", but in nvmem the context parameter comes from nvmem_config.priv which is never set - Leading to null pointer exceptions when the device is accessed. Fixes:29be47fcd6("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") Cc: stable <stable@kernel.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Tested-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250509122407.11763-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7a93add1d3
commit
fe8abdd175
1 changed files with 1 additions and 0 deletions
|
|
@ -213,6 +213,7 @@ static int zynqmp_nvmem_probe(struct platform_device *pdev)
|
|||
econfig.word_size = 1;
|
||||
econfig.size = ZYNQMP_NVMEM_SIZE;
|
||||
econfig.dev = dev;
|
||||
econfig.priv = dev;
|
||||
econfig.add_legacy_fixed_of_cells = true;
|
||||
econfig.reg_read = zynqmp_nvmem_read;
|
||||
econfig.reg_write = zynqmp_nvmem_write;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue