]> git.baikalelectronics.ru Git - kernel.git/commit
nvmem: hide unused nvmem_find_cell_by_index function
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 21:11:12 +0000 (23:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Oct 2018 13:56:15 +0000 (15:56 +0200)
commit4d578b8038e6f5462e2af3270435361559e70d1c
treeeca24b21361c1b4b4ba9dc2ce178f640f2c6432c
parent2072e788d5ed267867546bf7f4b015733cf671ce
nvmem: hide unused nvmem_find_cell_by_index function

nvmem_find_cell_by_index() is only called from inside an #ifdef,
so we get a build warning without CONFIG_OF:

drivers/nvmem/core.c:496:1: error: 'nvmem_find_cell_by_index' defined but not used [-Werror=unused-function]

Move it into the same #ifdef as the caller to avoid the warning.

Fixes: 247a8e428417 ("nvmem: resolve cells from DT at registration time")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c