mtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Thu, 20 Feb 2025 14:58:07 +0000 (15:58 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 28 Feb 2025 14:37:49 +0000 (08:37 -0600)
commit1ca97ee9039293858988dc38ea3a8ff995b4950e
tree017ee27b4b2ac0cdd9ce81a6a9a394f727700d10
parentd8212740541a4d69f6123730da7654e41e75ab17
mtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area

If there is an unallocated memory area before the last, filling parting
the size calculation for MTD_SIZE_REMAINING does not take this hole
into account.
Fix this by calculating the remaining size just based on total size
and partition offset.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
drivers/mtd/mtdpart.c