mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>
Wed, 6 Jun 2018 10:13:27 +0000 (12:13 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 21 Jun 2018 22:35:11 +0000 (00:35 +0200)
commitf93aa8c4de307069c270b2d81741961162bead6c
treed1651ebb5aa491ec2cc1bab9f2760b1c8cc632d5
parentfe3dd97dd66bb7fb23b8077a3803d2f951e60b00
mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()

do_ppb_xxlock() fails to add chip->start when querying for lock status
(and chip_ready test), which caused false status reports.
Fix that by adding adr += chip->start and adjust call sites
accordingly.

Fixes: 1648eaaa1575 ("mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking")
Cc: stable@vger.kernel.org
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/chips/cfi_cmdset_0002.c