File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -411,11 +411,13 @@ const struct of_device_id *rust_helper_of_match_device(
411411}
412412EXPORT_SYMBOL_GPL (rust_helper_of_match_device );
413413
414+ #ifdef CONFIG_OF
414415bool rust_helper_of_node_is_root (const struct device_node * np )
415416{
416417 return of_node_is_root (np );
417418}
418419EXPORT_SYMBOL_GPL (rust_helper_of_node_is_root );
420+ #endif
419421
420422struct device_node * rust_helper_of_parse_phandle (const struct device_node * np ,
421423 const char * phandle_name ,
Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ impl Node {
162162
163163 /// Returns `true` if the node is the root node.
164164 pub fn is_root ( & self ) -> bool {
165+ #[ cfg( not( CONFIG_OF ) ) ]
166+ {
167+ false
168+ }
169+ #[ cfg( CONFIG_OF ) ]
165170 unsafe { bindings:: of_node_is_root ( self . raw_node ) }
166171 }
167172
You can’t perform that action at this time.
0 commit comments