diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-06-07 18:27:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-06-11 10:36:56 -0400 |
commit | dc890c2dcd63a90de68ee5f0253eefbb89d725f0 (patch) | |
tree | 561a3c58647ae9775f7af0a48f56e2255d6eb22d /sound | |
parent | 42578c82e0f1810a07ebe29cb05e874893243d8c (diff) |
[ARM] 5544/1: Trust PrimeCell resource sizes
I found the PrimeCell/AMBA Bus drivers distrusting the resource
passed in as part of the struct amba_device abstraction. This
patch removes all hard coded resource sizes found in the PrimeCell
drivers and move the responsibility of this definition back to
the platform/board device definition, which already exist and
appear to be correct for all in-tree users of these drivers.
We do this using the resource_size() inline function which was
also replicated in the only driver using the resource size, so
that has been changed too. The KMI_SIZE was left in kmi.h in case
someone likes it. Test-compiled against Versatile and Integrator
defconfigs, seems to work but I don't posess these boards and
cannot test them.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/aaci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 5c48e36038f2..dc78272fc39f 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -1089,7 +1089,7 @@ static int __devinit aaci_probe(struct amba_device *dev, struct amba_id *id) | |||
1089 | goto out; | 1089 | goto out; |
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | aaci->base = ioremap(dev->res.start, SZ_4K); | 1092 | aaci->base = ioremap(dev->res.start, resource_size(&dev->res)); |
1093 | if (!aaci->base) { | 1093 | if (!aaci->base) { |
1094 | ret = -ENOMEM; | 1094 | ret = -ENOMEM; |
1095 | goto out; | 1095 | goto out; |