opp: Create _of_add_table_indexed() to reduce code duplication
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 27 Jan 2021 07:15:56 +0000 (12:45 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 2 Feb 2021 04:57:06 +0000 (10:27 +0530)
commit406e47652161d4f0d9bc4cd6237b36c51497ec75
tree41ecfaa41f07533619934a3c4f1d2d49683d1bdb
parentce8073d83f63a2cdcfc1b86d769456726faad51d
opp: Create _of_add_table_indexed() to reduce code duplication

The implementation of dev_pm_opp_of_add_table() and
dev_pm_opp_of_add_table_indexed() are almost identical. Create
_of_add_table_indexed() to reduce code redundancy.

Also remove the duplication of the doc style comments by referring to
dev_pm_opp_of_add_table() from dev_pm_opp_of_add_table_indexed().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
drivers/opp/of.c