summaryrefslogtreecommitdiff
path: root/arch/avr32/mach-at32ap/clock.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-04-14 06:50:37 (GMT)
committerIngo Molnar <mingo@elte.hu>2011-04-14 06:51:07 (GMT)
commita4c98f8bbeafee12c979c90743f6fda94f7515c7 (patch)
tree3dda24b8a2ec42ab7b42845cb68c8b6e1b0d501f /arch/avr32/mach-at32ap/clock.c
parentf4ad9bd208c98f32a6f9136618e0b8bebe3fb370 (diff)
parent85f2e689a5c8fb6ed8fdbee00109e7f6e5fefcb6 (diff)
downloadlinux-fsl-qoriq-a4c98f8bbeafee12c979c90743f6fda94f7515c7.tar.xz
Merge branch 'linus' into sched/locking
Merge reason: Pick up this upstream commit: 6631e635c65d: block: don't flush plugged IO on forced preemtion scheduling As it modifies the scheduler and we'll queue up dependent patches. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/avr32/mach-at32ap/clock.c')
-rw-r--r--arch/avr32/mach-at32ap/clock.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c
index 442f08c..86925fd6 100644
--- a/arch/avr32/mach-at32ap/clock.c
+++ b/arch/avr32/mach-at32ap/clock.c
@@ -35,22 +35,30 @@ void at32_clk_register(struct clk *clk)
spin_unlock(&clk_list_lock);
}
-struct clk *clk_get(struct device *dev, const char *id)
+static struct clk *__clk_get(struct device *dev, const char *id)
{
struct clk *clk;
- spin_lock(&clk_list_lock);
-
list_for_each_entry(clk, &at32_clock_list, list) {
if (clk->dev == dev && strcmp(id, clk->name) == 0) {
- spin_unlock(&clk_list_lock);
return clk;
}
}
- spin_unlock(&clk_list_lock);
return ERR_PTR(-ENOENT);
}
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+ struct clk *clk;
+
+ spin_lock(&clk_list_lock);
+ clk = __clk_get(dev, id);
+ spin_unlock(&clk_list_lock);
+
+ return clk;
+}
+
EXPORT_SYMBOL(clk_get);
void clk_put(struct clk *clk)
@@ -257,15 +265,15 @@ static int clk_show(struct seq_file *s, void *unused)
spin_lock(&clk_list_lock);
/* show clock tree as derived from the three oscillators */
- clk = clk_get(NULL, "osc32k");
+ clk = __clk_get(NULL, "osc32k");
dump_clock(clk, &r);
clk_put(clk);
- clk = clk_get(NULL, "osc0");
+ clk = __clk_get(NULL, "osc0");
dump_clock(clk, &r);
clk_put(clk);
- clk = clk_get(NULL, "osc1");
+ clk = __clk_get(NULL, "osc1");
dump_clock(clk, &r);
clk_put(clk);