mtd: maps: gpio-addr-flash: Fix ioremapped size
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thu, 4 Oct 2018 13:01:04 +0000 (15:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:14 +0000 (11:08 -0800)
commit53772af08acd3e5143a5c1e6f7b8ddd3cabb350f
tree5ff3523b9773b7aeb0f1834ed0fbaa39c6328c9a
parent6737137331176d4f6d8878fbc7979e5de398dca9
mtd: maps: gpio-addr-flash: Fix ioremapped size

commit 6c925b333368cda4e1b0513b07f72316c0e7edd7 upstream.

We should only iomap the area of the chip that is memory mapped.
Otherwise we could be mapping devices beyond the memory space or that
belong to other devices.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/maps/gpio-addr-flash.c