diff options
author | Rob Herring <robh@kernel.org> | 2014-03-29 15:14:17 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-04-30 01:59:14 -0400 |
commit | bba04d965d06abbbe10afd3687742389107e198e (patch) | |
tree | 39d1853a9982bca0413a3d2313e47032f98f23b1 /drivers/of | |
parent | 0ee0496de97c6a511ce915f9b44f5b3db15350b7 (diff) |
of/fdt: remove unused of_scan_flat_dt_by_path
of_scan_flat_dt_by_path is unused anywhere in the kernel, so remove it.
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Stephen Chivers <schivers@csc.com>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 63bdcee473fa..9c8535291909 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -671,73 +671,6 @@ struct fdt_scan_status { | |||
671 | void *data; | 671 | void *data; |
672 | }; | 672 | }; |
673 | 673 | ||
674 | /** | ||
675 | * fdt_scan_node_by_path - iterator for of_scan_flat_dt_by_path function | ||
676 | */ | ||
677 | static int __init fdt_scan_node_by_path(unsigned long node, const char *uname, | ||
678 | int depth, void *data) | ||
679 | { | ||
680 | struct fdt_scan_status *st = data; | ||
681 | |||
682 | /* | ||
683 | * if scan at the requested fdt node has been completed, | ||
684 | * return -ENXIO to abort further scanning | ||
685 | */ | ||
686 | if (depth <= st->depth) | ||
687 | return -ENXIO; | ||
688 | |||
689 | /* requested fdt node has been found, so call iterator function */ | ||
690 | if (st->found) | ||
691 | return st->iterator(node, uname, depth, st->data); | ||
692 | |||
693 | /* check if scanning automata is entering next level of fdt nodes */ | ||
694 | if (depth == st->depth + 1 && | ||
695 | strncmp(st->name, uname, st->namelen) == 0 && | ||
696 | uname[st->namelen] == 0) { | ||
697 | st->depth += 1; | ||
698 | if (st->name[st->namelen] == 0) { | ||
699 | st->found = 1; | ||
700 | } else { | ||
701 | const char *next = st->name + st->namelen + 1; | ||
702 | st->name = next; | ||
703 | st->namelen = strcspn(next, "/"); | ||
704 | } | ||
705 | return 0; | ||
706 | } | ||
707 | |||
708 | /* scan next fdt node */ | ||
709 | return 0; | ||
710 | } | ||
711 | |||
712 | /** | ||
713 | * of_scan_flat_dt_by_path - scan flattened tree blob and call callback on each | ||
714 | * child of the given path. | ||
715 | * @path: path to start searching for children | ||
716 | * @it: callback function | ||
717 | * @data: context data pointer | ||
718 | * | ||
719 | * This function is used to scan the flattened device-tree starting from the | ||
720 | * node given by path. It is used to extract information (like reserved | ||
721 | * memory), which is required on ealy boot before we can unflatten the tree. | ||
722 | */ | ||
723 | int __init of_scan_flat_dt_by_path(const char *path, | ||
724 | int (*it)(unsigned long node, const char *name, int depth, void *data), | ||
725 | void *data) | ||
726 | { | ||
727 | struct fdt_scan_status st = {path, 0, -1, 0, it, data}; | ||
728 | int ret = 0; | ||
729 | |||
730 | if (initial_boot_params) | ||
731 | ret = of_scan_flat_dt(fdt_scan_node_by_path, &st); | ||
732 | |||
733 | if (!st.found) | ||
734 | return -ENOENT; | ||
735 | else if (ret == -ENXIO) /* scan has been completed */ | ||
736 | return 0; | ||
737 | else | ||
738 | return ret; | ||
739 | } | ||
740 | |||
741 | const char * __init of_flat_dt_get_machine_name(void) | 674 | const char * __init of_flat_dt_get_machine_name(void) |
742 | { | 675 | { |
743 | const char *name; | 676 | const char *name; |