From e68859fe2372f495e907a25ab8a9fd030cb13e29 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 22 Jun 2006 22:18:21 +0100 Subject: [PATCH] --- yaml --- r: 28874 b: refs/heads/master c: 92b7eb8ffc0741f1fd5fbd5458a466d608310442 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-s3c2410/clock.c | 7 +++++-- trunk/arch/arm/mach-s3c2410/clock.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 937c68a0ac68..ca3679efb021 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 99c13853ffa26dd6527995b3f47548e075f201fb +refs/heads/master: 92b7eb8ffc0741f1fd5fbd5458a466d608310442 diff --git a/trunk/arch/arm/mach-s3c2410/clock.c b/trunk/arch/arm/mach-s3c2410/clock.c index f553e5ee7477..c5c93c333ac6 100644 --- a/trunk/arch/arm/mach-s3c2410/clock.c +++ b/trunk/arch/arm/mach-s3c2410/clock.c @@ -148,8 +148,11 @@ unsigned long clk_get_rate(struct clk *clk) if (clk->rate != 0) return clk->rate; - while (clk->parent != NULL && clk->rate == 0) - clk = clk->parent; + if (clk->get_rate != NULL) + return (clk->get_rate)(clk); + + if (clk->parent != NULL) + return clk_get_rate(clk->parent); return clk->rate; } diff --git a/trunk/arch/arm/mach-s3c2410/clock.h b/trunk/arch/arm/mach-s3c2410/clock.h index 1bee5708c354..9456c81eb5d3 100644 --- a/trunk/arch/arm/mach-s3c2410/clock.h +++ b/trunk/arch/arm/mach-s3c2410/clock.h @@ -22,6 +22,7 @@ struct clk { int (*enable)(struct clk *, int enable); int (*set_rate)(struct clk *c, unsigned long rate); + unsigned long (*get_rate)(struct clk *c); unsigned long (*round_rate)(struct clk *c, unsigned long rate); int (*set_parent)(struct clk *c, struct clk *parent); };