]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8c157d6820cf723ca8bd78ab638dcea30ed767c0
tree7a610da79206aad6dac00c6ee6a3dd98ef87397d
parent712aa3eba11d33506cabca83e824c5406c57e1e0
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