mtd: docg3 fix inbound calculations
authorRobert Jarzmik <robert.jarzmik@free.fr>
Thu, 22 Mar 2012 20:00:50 +0000 (21:00 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 27 Mar 2012 00:03:00 +0000 (01:03 +0100)
commita7baef1211b0ac218299965481e7cff9d68c1edd
treed9737628c725cb983dfebf9958c3093c4f66573d
parenta78da28776496d3a850ce741d3474b65057e156b
mtd: docg3 fix inbound calculations

The last erase block was not accessible, as the out of bound
check was incorrectly rejecting the last block.
The read/write/erase offset checks were forbidding the usage of the
last block, because of the calculation which was considering the
byte after the last instead of the last byte.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/docg3.c