]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nvmem: core: Allow getting nvmem cell with a NULL cell id
authorVivek Gautam <vivek.gautam@codeaurora.org>
Sun, 22 Jan 2017 23:02:40 +0000 (23:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 10:49:39 +0000 (11:49 +0100)
commitfd0c478c0dd800449e2d70025ef742679a16a8de
treee86523b9f86717ce44f515b7ed434646eeebd985
parent29143268ec7d292ae4531bdf8deb6e55239a0051
nvmem: core: Allow getting nvmem cell with a NULL cell id

The nvmem cell with a NULL cell name/id should be the one
with no accompanying 'nvmem-cell-names' property, and thus
will be the cell at index 0 in the device tree.
So, we default to index 0 and update the cell index only when
nvmem cell name id exists.

Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c