LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/5] ARM: etm: Don't require clock control
@ 2011-02-03  2:54 Arve Hjønnevåg
  2011-02-03  2:54 ` [PATCH 2/5] ARM: etm: Don't limit tracing to only non-secure code Arve Hjønnevåg
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Arve Hjønnevåg @ 2011-02-03  2:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Arve Hjønnevåg, Russell King, Alexander Shishkin,
	Jason Wessel, Greg Kroah-Hartman, linux-kernel

If clk_get fail, assume the etb does not need a separate clock.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
---
 arch/arm/kernel/etm.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 11db628..308b733 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -362,12 +362,10 @@ static int __init etb_probe(struct amba_device *dev, struct amba_id *id)
 		goto out_unmap;
 
 	t->emu_clk = clk_get(&dev->dev, "emu_src_ck");
-	if (IS_ERR(t->emu_clk)) {
+	if (IS_ERR(t->emu_clk))
 		dev_dbg(&dev->dev, "Failed to obtain emu_src_ck.\n");
-		return -EFAULT;
-	}
-
-	clk_enable(t->emu_clk);
+	else
+		clk_enable(t->emu_clk);
 
 	etb_unlock(t);
 	t->etb_bufsz = etb_readl(t, ETBR_DEPTH);
@@ -402,8 +400,10 @@ static int etb_remove(struct amba_device *dev)
 	iounmap(t->etb_regs);
 	t->etb_regs = NULL;
 
-	clk_disable(t->emu_clk);
-	clk_put(t->emu_clk);
+	if (!IS_ERR(t->emu_clk)) {
+		clk_disable(t->emu_clk);
+		clk_put(t->emu_clk);
+	}
 
 	amba_release_regions(dev);
 
-- 
1.7.3.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-02-24  1:36 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03  2:54 [PATCH 1/5] ARM: etm: Don't require clock control Arve Hjønnevåg
2011-02-03  2:54 ` [PATCH 2/5] ARM: etm: Don't limit tracing to only non-secure code Arve Hjønnevåg
2011-02-03  2:54 ` [PATCH 3/5] ARM: etm: Don't trigger another overflow when trying to clear the RAM-full status Arve Hjønnevåg
2011-02-03  2:54 ` [PATCH 4/5] ARM: etm: Allow range selection Arve Hjønnevåg
2011-02-03  2:54 ` [PATCH 5/5] ARM: etm: Configure data tracing Arve Hjønnevåg
2011-02-03 12:45 ` [PATCH 1/5] ARM: etm: Don't require clock control Mark Brown
2011-02-04  0:30   ` Arve Hjønnevåg
2011-02-04 14:31     ` Mark Brown
2011-02-15  6:11 ` [PATCH 1/8] " Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 2/8] ARM: etm: Don't limit tracing to only non-secure code Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 3/8] ARM: etm: Don't try to clear the buffer full status after reading the buffer Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 4/8] ARM: etm: Allow range selection Arve Hjønnevåg
2011-02-15 13:50   ` Alexander Shishkin
2011-02-15 23:04     ` Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 5/8] ARM: etm: Configure data tracing Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 6/8] ARM: etm: Add some missing locks and error checks Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 7/8] ARM: etm: Return the entire trace buffer if it is empty after reset Arve Hjønnevåg
2011-02-15  6:11 ` [PATCH 8/8] ARM: etm: Support multiple ETMs/PTMs Arve Hjønnevåg
2011-02-24  1:36 ` [PATCH 9/9 (originally 8)] ARM: etm: Power down etm(s) when tracing is not enabled Arve Hjønnevåg

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).