diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-21 03:09:42 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-03 21:38:07 +0400 |
commit | 45c7f75fd4b57035cd35954986a2faefb07dac9d (patch) | |
tree | 1cab7610cd45d2b38334f62c49406a1b74ecdabe /arch/arm/mach-sa1100/generic.c | |
parent | c4592ce4e8f69d78711d53f0a42ec1b4dbf00cde (diff) | |
download | linux-45c7f75fd4b57035cd35954986a2faefb07dac9d.tar.xz |
MFD: mcp-sa11x0: convert mcp-sa11x0 to use platform resources
Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use
platform resources.) by Jochen Friedrich <jochen@scram.de>, and fixes
applied.
We can safely do this now that we have sanitized host removal; the
original patch had use-after-free bugs in the removal code. Not only
that, but there was no checking of the ioremap() return.
The final change over Jochen's patch is that we wrap the base pointer
selection inside the various register indexes, which reduces the
possibility of the wrong register index being used.
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/generic.c')
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 1416094cc013..9379c53d3018 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -221,6 +221,11 @@ static struct resource sa11x0mcp_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { + .start = __PREG(Ser4MCCR1), + .end = __PREG(Ser4MCCR1) + 4 - 1, + .flags = IORESOURCE_MEM, + }, + [2] = { .start = IRQ_Ser4MCP, .end = IRQ_Ser4MCP, .flags = IORESOURCE_IRQ, |