OSDN Git Service

mtd: afs: simplify partition detection
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 2 May 2019 14:30:30 +0000 (16:30 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 6 May 2019 19:48:46 +0000 (21:48 +0200)
commit20700171929316ed88fdd11b3099518a0bd2f36e
tree9fa87aa15c7afc017a9e3142fdc164a24eab8699
parent1fca1f6abb38a6c2a082c1df01601d0898454d7a
mtd: afs: simplify partition detection

Instead of reading out the AFS footers twice, create a separate
function to just check if there is a footer or not. Rids a few
local variables and prepare us to join the actual parser into
one function.

Cc: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/parsers/afs.c