All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thara Gopinath <thara@ti.com>
To: linux-omap@vger.kernel.org
Cc: khilman@deeprootsystems.com, paul@pwsan.com, nm@ti.com,
	vishwanath.bs@ti.com, sawant@ti.com,
	Thara Gopinath <thara@ti.com>
Subject: [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp
Date: Sat, 24 Jul 2010 12:12:33 +0530	[thread overview]
Message-ID: <1279953753-1377-1-git-send-email-thara@ti.com> (raw)

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


             reply	other threads:[~2010-07-24  6:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24  6:42 Thara Gopinath [this message]
2010-07-27  0:09 ` [PM-OPP][PATCH] OMAP: Add check for omap_device pointer before adding an opp Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279953753-1377-1-git-send-email-thara@ti.com \
    --to=thara@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=sawant@ti.com \
    --cc=vishwanath.bs@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.