Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remoteproc: fix !CONFIG_OF build breakage

Fix this:

drivers/remoteproc/remoteproc_core.c: In function 'rproc_get_by_phandle':
>> drivers/remoteproc/remoteproc_core.c:1167:2: error: implicit declaration of function 'of_find_node_by_phandle' [-Werror=implicit-function-declaration]
np = of_find_node_by_phandle(phandle);

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Suman Anna <s-anna@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>

+7
+7
drivers/remoteproc/remoteproc_core.c
··· 1178 1178 * 1179 1179 * Returns the rproc handle on success, and NULL on failure. 1180 1180 */ 1181 + #ifdef CONFIG_OF 1181 1182 struct rproc *rproc_get_by_phandle(phandle phandle) 1182 1183 { 1183 1184 struct rproc *rproc = NULL, *r; ··· 1202 1201 1203 1202 return rproc; 1204 1203 } 1204 + #else 1205 + struct rproc *rproc_get_by_phandle(phandle phandle) 1206 + { 1207 + return NULL; 1208 + } 1209 + #endif 1205 1210 EXPORT_SYMBOL(rproc_get_by_phandle); 1206 1211 1207 1212 /**