All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Thara Gopinath <thara@ti.com>
Subject: [PATCH 1/4] OMAP: HWMOD: Adding clockdomain check
Date: Tue, 30 Mar 2010 01:56:45 -0600	[thread overview]
Message-ID: <20100330075638.11629.98717.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100330074801.11629.61888.stgit@localhost.localdomain>

From: Thara Gopinath <thara@ti.com>

This patch adds check for presence of clockdomain structure in the API
omap_hwmod_get_pwrdm before trying to access the powerdomain structure.
This will prevent unnecessary crashing of the system in case of a
clock node with out an associated clockdomain.

Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index c664947..e436dcb 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1511,6 +1511,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
 		c = oh->slaves[oh->_mpu_port_index]->_clk;
 	}
 
+	if (!c->clkdm)
+		return NULL;
+
 	return c->clkdm->pwrdm.ptr;
 
 }



WARNING: multiple messages have this Message-ID (diff)
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] OMAP: HWMOD: Adding clockdomain check
Date: Tue, 30 Mar 2010 01:56:45 -0600	[thread overview]
Message-ID: <20100330075638.11629.98717.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100330074801.11629.61888.stgit@localhost.localdomain>

From: Thara Gopinath <thara@ti.com>

This patch adds check for presence of clockdomain structure in the API
omap_hwmod_get_pwrdm before trying to access the powerdomain structure.
This will prevent unnecessary crashing of the system in case of a
clock node with out an associated clockdomain.

Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index c664947..e436dcb 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1511,6 +1511,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
 		c = oh->slaves[oh->_mpu_port_index]->_clk;
 	}
 
+	if (!c->clkdm)
+		return NULL;
+
 	return c->clkdm->pwrdm.ptr;
 
 }

  reply	other threads:[~2010-03-30  7:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30  7:56 [PATCH 0/4] OMAP clock/hwmod fixes for 2.6.34-rc Paul Walmsley
2010-03-30  7:56 ` Paul Walmsley
2010-03-30  7:56 ` Paul Walmsley [this message]
2010-03-30  7:56   ` [PATCH 1/4] OMAP: HWMOD: Adding clockdomain check Paul Walmsley
2010-03-30  7:56 ` [PATCH 2/4] OMAP: HWMOD: Bug fixes in hwmod structure definitions Paul Walmsley
2010-03-30  7:56   ` Paul Walmsley
2010-03-30  7:56 ` [PATCH 3/4] OMAP4: prcm: Use logical OR instead of bitwise OR Paul Walmsley
2010-03-30  7:56   ` Paul Walmsley
2010-03-30  7:56 ` [PATCH 4/4] OMAP3: clock: fix enable bit used for dpll4_m4x2 clock Paul Walmsley
2010-03-30  7:56   ` Paul Walmsley

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=20100330075638.11629.98717.stgit@localhost.localdomain \
    --to=paul@pwsan.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=thara@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.