diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2013-01-18 01:32:02 +0000 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-06 11:06:37 +0000 |
commit | b5961f86802a1d76b377940ae6df53e877bdf235 (patch) | |
tree | 71347bd08d9ba9658c89cc0ff7a22f5c3c9c1e16 | |
parent | f21ccfa07070228e0c32dad05d1cb0d19128517c (diff) | |
download | talos-op-linux-b5961f86802a1d76b377940ae6df53e877bdf235.tar.gz talos-op-linux-b5961f86802a1d76b377940ae6df53e877bdf235.zip |
powerpc/5200: Fix size to request_mem_region() call
The Bestcomm driver requests a memory region larger than the one
described in the device tree. This is due to an extra undocumented field
in the bestcomm register structure. This hasn't been a problem up to
now, but there is a patch pending to make the DT platform_bus support
code use platform_device_add() which tightens the rules and provides
extra checks for drivers to stay within the specified register regions.
Alternately, I could have removed the extra field from the structure,
but I'm not sure if it is still needed for resume to work. Better be
safe and leave it in.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anatolij Gustschin <agust@denx.de>
-rw-r--r-- | arch/powerpc/sysdev/bestcomm/bestcomm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index d9130630f7ef..81c331481336 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c @@ -414,7 +414,7 @@ static int mpc52xx_bcom_probe(struct platform_device *op) goto error_sramclean; } - if (!request_mem_region(res_bcom.start, sizeof(struct mpc52xx_sdma), + if (!request_mem_region(res_bcom.start, resource_size(&res_bcom), DRIVER_NAME)) { printk(KERN_ERR DRIVER_NAME ": " "Can't request registers region\n"); |