mtd: maps: gpio-addr-flash: Use order instead of size
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thu, 4 Oct 2018 13:01:06 +0000 (15:01 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 8 Oct 2018 19:32:49 +0000 (21:32 +0200)
commit460cdeca546fc75f2450914c96e701f990396285
tree7a610da79206aad6dac00c6ee6a3dd98ef87397d
parent4edc00adfd58768b065204968948c52f5e5b07b1
mtd: maps: gpio-addr-flash: Use order instead of size

By using the order of the window instead of the size, we can replace a
lot of expensive division and modulus on the code with simple bit
operations.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/maps/gpio-addr-flash.c