Commit e3c57087ced40ed6a510dc771aa952fa1ebded01
Committed by
Afzal Mohammed
1 parent
f92e7d1144
Exists in
master
OMAP2+: OPP: Do not skip scanning OPP table if one of them is invalid
Let omap_init_opp_table run through all the OPP's instead of returning on seeing the first invalid one. Skip the invalid ones and give a fair chance to the rest to get registered, if they are found to be valid. For every invalid entry in the OPP table, instead of a pr_warn, do a WARN so it gets the attention it needs. Signed-off-by: Rajendra Nayak <rnayak@ti.com> [vaibhav.bedia@ti.com: Pull in for AM33xx] Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Showing 1 changed file with 6 additions and 5 deletions Side-by-side Diff
arch/arm/mach-omap2/opp.c
... | ... | @@ -59,16 +59,16 @@ |
59 | 59 | struct device *dev; |
60 | 60 | |
61 | 61 | if (!opp_def->hwmod_name) { |
62 | - pr_err("%s: NULL name of omap_hwmod, failing [%d].\n", | |
63 | - __func__, i); | |
64 | - return -EINVAL; | |
62 | + WARN(1, "%s: NULL name of omap_hwmod, failing" | |
63 | + " [%d].\n", __func__, i); | |
64 | + goto next; | |
65 | 65 | } |
66 | 66 | oh = omap_hwmod_lookup(opp_def->hwmod_name); |
67 | 67 | if (!oh || !oh->od) { |
68 | - pr_warn("%s: no hwmod or odev for %s, [%d] " | |
68 | + WARN(1, "%s: no hwmod or odev for %s, [%d] " | |
69 | 69 | "cannot add OPPs.\n", __func__, |
70 | 70 | opp_def->hwmod_name, i); |
71 | - return -EINVAL; | |
71 | + goto next; | |
72 | 72 | } |
73 | 73 | dev = &oh->od->pdev->dev; |
74 | 74 | |
... | ... | @@ -93,6 +93,7 @@ |
93 | 93 | dev_err(dev, "%s:%s:err dvfs register %d %d\n", |
94 | 94 | __func__, opp_def->hwmod_name, r, i); |
95 | 95 | } |
96 | +next: | |
96 | 97 | opp_def++; |
97 | 98 | } |
98 | 99 |