* [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp
@ 2010-07-24 6:42 Thara Gopinath
2010-07-27 0:09 ` Nishanth Menon
0 siblings, 1 reply; 2+ messages in thread
From: Thara Gopinath @ 2010-07-24 6:42 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 accesses 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>
---
arch/arm/plat-omap/opp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
index 0273497..e81bb95 100644
--- a/arch/arm/plat-omap/opp.c
+++ b/arch/arm/plat-omap/opp.c
@@ -333,7 +333,7 @@ int opp_add(const struct omap_opp_def *opp_def)
return -EINVAL;
}
oh = omap_hwmod_lookup(opp_def->hwmod_name);
- if (!oh) {
+ if (!oh || !oh->od) {
pr_warn("%s: no hwmod 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] 2+ messages in thread
* Re: [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp
2010-07-24 6:42 [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp Thara Gopinath
@ 2010-07-27 0:09 ` Nishanth Menon
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2010-07-27 0:09 UTC (permalink / raw)
To: Gopinath, Thara
Cc: linux-omap@vger.kernel.org, khilman@deeprootsystems.com,
paul@pwsan.com, Sripathy, Vishwanath, Sawant, Anand
Gopinath, Thara had written, on 07/24/2010 01:42 AM, the following:
> 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 accesses 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>
> ---
> arch/arm/plat-omap/opp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
> index 0273497..e81bb95 100644
> --- a/arch/arm/plat-omap/opp.c
> +++ b/arch/arm/plat-omap/opp.c
> @@ -333,7 +333,7 @@ int opp_add(const struct omap_opp_def *opp_def)
> return -EINVAL;
> }
> oh = omap_hwmod_lookup(opp_def->hwmod_name);
> - if (!oh) {
> + if (!oh || !oh->od) {
> pr_warn("%s: no hwmod for %s, cannot add OPPs.\n",
just to continue to have sane warnings,
minor nitpick -> s/no hwmod/no hwmod or odev/
> __func__, opp_def->hwmod_name);
> return -EINVAL;
Acked-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-27 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-24 6:42 [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp Thara Gopinath
2010-07-27 0:09 ` Nishanth Menon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.