From e3c57087ced40ed6a510dc771aa952fa1ebded01 Mon Sep 17 00:00:00 2001 From: Rajendra Nayak Date: Mon, 20 Jun 2011 18:44:17 +0530 Subject: [PATCH] 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 [vaibhav.bedia@ti.com: Pull in for AM33xx] Signed-off-by: Vaibhav Bedia --- arch/arm/mach-omap2/opp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index 0fd5e4d..ea8a96d 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -59,16 +59,16 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, struct device *dev; if (!opp_def->hwmod_name) { - pr_err("%s: NULL name of omap_hwmod, failing [%d].\n", - __func__, i); - return -EINVAL; + WARN(1, "%s: NULL name of omap_hwmod, failing" + " [%d].\n", __func__, i); + goto next; } oh = omap_hwmod_lookup(opp_def->hwmod_name); if (!oh || !oh->od) { - pr_warn("%s: no hwmod or odev for %s, [%d] " + WARN(1, "%s: no hwmod or odev for %s, [%d] " "cannot add OPPs.\n", __func__, opp_def->hwmod_name, i); - return -EINVAL; + goto next; } dev = &oh->od->pdev->dev; @@ -93,6 +93,7 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, dev_err(dev, "%s:%s:err dvfs register %d %d\n", __func__, opp_def->hwmod_name, r, i); } +next: opp_def++; } -- 1.9.1