* [PM-OPP][PATCHV2] OMAP: Add check for omap_device pointer before adding an opp
@ 2010-08-02 8:21 Thara Gopinath
0 siblings, 0 replies; only message in thread
From: Thara Gopinath @ 2010-08-02 8:21 UTC (permalink / raw)
To: linux-omap; +Cc: khilman, paul, nm, vishwanath.bs, sawant, Thara Gopinath
This patch adds the check for whether a omap_device and in turn
platform_device and device pointers exist for the device before
adding it's opp table into the global table. This is because all
the later access to the opp entries are based on dev pointer and
hence there is no point in adding a opp if the dev pointer does
not exist.
Signed-off-by: Thara Gopinath <thara@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
---
arch/arm/plat-omap/opp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
index 0273497..f3855ba 100644
--- a/arch/arm/plat-omap/opp.c
+++ b/arch/arm/plat-omap/opp.c
@@ -333,8 +333,8 @@ int opp_add(const struct omap_opp_def *opp_def)
return -EINVAL;
}
oh = omap_hwmod_lookup(opp_def->hwmod_name);
- if (!oh) {
- pr_warn("%s: no hwmod for %s, cannot add OPPs.\n",
+ if (!oh || !oh->od) {
+ pr_warn("%s: no hwmod or odev for %s, cannot add OPPs.\n",
__func__, opp_def->hwmod_name);
return -EINVAL;
}
--
1.7.0.rc1.33.g07cf0f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-02 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 8:21 [PM-OPP][PATCHV2] OMAP: Add check for omap_device pointer before adding an opp Thara Gopinath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).