git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
arm
/
mach-integrator
/
clock.c
diff --git
a/arch/arm/mach-integrator/clock.c
b/arch/arm/mach-integrator/clock.c
index
5620059
..
95a1e26
100644
(file)
--- a/
arch/arm/mach-integrator/clock.c
+++ b/
arch/arm/mach-integrator/clock.c
@@
-13,28
+13,30
@@
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
+#include <linux/string.h>
+#include <linux/clk.h>
+#include <linux/mutex.h>
#include <asm/semaphore.h>
#include <asm/semaphore.h>
-#include <asm/hardware/clock.h>
#include <asm/hardware/icst525.h>
#include "clock.h"
static LIST_HEAD(clocks);
#include <asm/hardware/icst525.h>
#include "clock.h"
static LIST_HEAD(clocks);
-static DE
CLARE_MUTEX(clocks_sem
);
+static DE
FINE_MUTEX(clocks_mutex
);
struct clk *clk_get(struct device *dev, const char *id)
{
struct clk *p, *clk = ERR_PTR(-ENOENT);
struct clk *clk_get(struct device *dev, const char *id)
{
struct clk *p, *clk = ERR_PTR(-ENOENT);
-
down(&clocks_sem
);
+
mutex_lock(&clocks_mutex
);
list_for_each_entry(p, &clocks, node) {
if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
clk = p;
break;
}
}
list_for_each_entry(p, &clocks, node) {
if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
clk = p;
break;
}
}
-
up(&clocks_sem
);
+
mutex_unlock(&clocks_mutex
);
return clk;
}
return clk;
}
@@
-57,17
+59,6
@@
void clk_disable(struct clk *clk)
}
EXPORT_SYMBOL(clk_disable);
}
EXPORT_SYMBOL(clk_disable);
-int clk_use(struct clk *clk)
-{
- return 0;
-}
-EXPORT_SYMBOL(clk_use);
-
-void clk_unuse(struct clk *clk)
-{
-}
-EXPORT_SYMBOL(clk_unuse);
-
unsigned long clk_get_rate(struct clk *clk)
{
return clk->rate;
unsigned long clk_get_rate(struct clk *clk)
{
return clk->rate;
@@
-117,18
+108,18
@@
static struct clk uart_clk = {
int clk_register(struct clk *clk)
{
int clk_register(struct clk *clk)
{
-
down(&clocks_sem
);
+
mutex_lock(&clocks_mutex
);
list_add(&clk->node, &clocks);
list_add(&clk->node, &clocks);
-
up(&clocks_sem
);
+
mutex_unlock(&clocks_mutex
);
return 0;
}
EXPORT_SYMBOL(clk_register);
void clk_unregister(struct clk *clk)
{
return 0;
}
EXPORT_SYMBOL(clk_register);
void clk_unregister(struct clk *clk)
{
-
down(&clocks_sem
);
+
mutex_lock(&clocks_mutex
);
list_del(&clk->node);
list_del(&clk->node);
-
up(&clocks_sem
);
+
mutex_unlock(&clocks_mutex
);
}
EXPORT_SYMBOL(clk_unregister);
}
EXPORT_SYMBOL(clk_unregister);