m68k/mac: Fix SWIM memory resource end address
authorFinn Thain <fthain@telegraphics.com.au>
Thu, 12 Apr 2018 00:50:14 +0000 (20:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:24:46 +0000 (11:24 +0200)
commit 3e2816c1078eb2b5a3276eb83d4da156b3e2d04f upstream.

The resource size is 0x2000 == end - start + 1.
Therefore end == start + 0x2000 - 1.

Cc: Laurent Vivier <lvivier@redhat.com>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/m68k/mac/config.c

index 22123f7e8f750c4c16fb456952810af9e777e415..2004b3f72d804a3fa61667d41405fd374b9bf3da 100644 (file)
@@ -1017,7 +1017,7 @@ int __init mac_platform_init(void)
                struct resource swim_rsrc = {
                        .flags = IORESOURCE_MEM,
                        .start = (resource_size_t)swim_base,
-                       .end   = (resource_size_t)swim_base + 0x2000,
+                       .end   = (resource_size_t)swim_base + 0x1FFF,
                };
 
                platform_device_register_simple("swim", -1, &swim_rsrc, 1);