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
/
impd1.c
diff --git
a/arch/arm/mach-integrator/impd1.c
b/arch/arm/mach-integrator/impd1.c
index
c3c2f17
..
92d79fb
100644
(file)
--- a/
arch/arm/mach-integrator/impd1.c
+++ b/
arch/arm/mach-integrator/impd1.c
@@
-18,11
+18,11
@@
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/mm.h>
+#include <linux/amba/bus.h>
+#include <linux/amba/clcd.h>
#include <asm/io.h>
#include <asm/hardware/icst525.h>
#include <asm/io.h>
#include <asm/hardware/icst525.h>
-#include <asm/hardware/amba.h>
-#include <asm/hardware/amba_clcd.h>
#include <asm/arch/lm.h>
#include <asm/arch/impd1.h>
#include <asm/sizes.h>
#include <asm/arch/lm.h>
#include <asm/arch/impd1.h>
#include <asm/sizes.h>
@@
-67,7
+67,7
@@
static void impd1_setvco(struct clk *clk, struct icst525_vco vco)
}
writel(0, impd1->base + IMPD1_LOCK);
}
writel(0, impd1->base + IMPD1_LOCK);
-#if DEBUG
+#if
def
DEBUG
vco.v = val & 0x1ff;
vco.r = (val >> 9) & 0x7f;
vco.s = (val >> 16) & 7;
vco.v = val & 0x1ff;
vco.r = (val >> 9) & 0x7f;
vco.s = (val >> 16) & 7;
@@
-355,12
+355,11
@@
static int impd1_probe(struct lm_device *dev)
if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
return -EBUSY;
if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
return -EBUSY;
- impd1 = k
m
alloc(sizeof(struct impd1_module), GFP_KERNEL);
+ impd1 = k
z
alloc(sizeof(struct impd1_module), GFP_KERNEL);
if (!impd1) {
ret = -ENOMEM;
goto release_lm;
}
if (!impd1) {
ret = -ENOMEM;
goto release_lm;
}
- memset(impd1, 0, sizeof(struct impd1_module));
impd1->base = ioremap(dev->resource.start, SZ_4K);
if (!impd1->base) {
impd1->base = ioremap(dev->resource.start, SZ_4K);
if (!impd1->base) {
@@
-389,12
+388,10
@@
static int impd1_probe(struct lm_device *dev)
pc_base = dev->resource.start + idev->offset;
pc_base = dev->resource.start + idev->offset;
- d = k
m
alloc(sizeof(struct amba_device), GFP_KERNEL);
+ d = k
z
alloc(sizeof(struct amba_device), GFP_KERNEL);
if (!d)
continue;
if (!d)
continue;
- memset(d, 0, sizeof(struct amba_device));
-
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
"lm%x:%5.5lx", dev->id, idev->offset >> 12);
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
"lm%x:%5.5lx", dev->id, idev->offset >> 12);
@@
-420,24
+417,24
@@
static int impd1_probe(struct lm_device *dev)
free_impd1:
if (impd1 && impd1->base)
iounmap(impd1->base);
free_impd1:
if (impd1 && impd1->base)
iounmap(impd1->base);
- if (impd1)
- kfree(impd1);
+ kfree(impd1);
release_lm:
release_mem_region(dev->resource.start, SZ_4K);
return ret;
}
release_lm:
release_mem_region(dev->resource.start, SZ_4K);
return ret;
}
+static int impd1_remove_one(struct device *dev, void *data)
+{
+ device_unregister(dev);
+ return 0;
+}
+
static void impd1_remove(struct lm_device *dev)
{
struct impd1_module *impd1 = lm_get_drvdata(dev);
static void impd1_remove(struct lm_device *dev)
{
struct impd1_module *impd1 = lm_get_drvdata(dev);
- struct list_head *l, *n;
int i;
int i;
- list_for_each_safe(l, n, &dev->dev.children) {
- struct device *d = list_to_dev(l);
-
- device_unregister(d);
- }
+ device_for_each_child(&dev->dev, NULL, impd1_remove_one);
for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++)
clk_unregister(&impd1->vcos[i]);
for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++)
clk_unregister(&impd1->vcos[i]);