OSDN Git Service

nvmem: core: fix regression in of_nvmem_cell_get()
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 6 Nov 2018 15:41:41 +0000 (15:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 17:15:29 +0000 (09:15 -0800)
commit0749aa25af82c690395a96e799cd2c6e54c459cf
tree782f6fd923728fcc6adf3132a40ca40d7e023ad2
parent7c97301285b62a41d6bceded7d964085fc8cc50f
nvmem: core: fix regression in of_nvmem_cell_get()

NVMEM DT support seems to be totally broken after
commit e888d445ac33 ("nvmem: resolve cells from DT at registration time")
Fix this!

Index used in of_nvmem_cell_get() to find cell is specific to
consumer, It can not be used for searching the cell in provider.
Use device_node instead of this to find the matching cell in device
tree case.

Fixes: e888d445ac33 ("nvmem: resolve cells from DT at registration time")
Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c