Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9498440f authored by Linus Walleij's avatar Linus Walleij Committed by Brian Norris
Browse files

mtd: afs: break out v1 footer magic to a define



Break out the magic number to a #defined constant.

Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 8cf98018
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>

#define AFSV1_FOOTER_MAGIC 0xA0FFFF9F

struct footer_v1 {
	u32 image_info_base;	/* Address of first word of ImageFooter  */
	u32 image_start;	/* Start of area reserved by this footer */
@@ -90,7 +92,7 @@ afs_read_footer_v1(struct mtd_info *mtd, u_int *img_start, u_int *iis_start,
	/*
	 * Does it contain the magic number?
	 */
	if (fs.signature != 0xa0ffff9f)
	if (fs.signature != AFSV1_FOOTER_MAGIC)
		ret = 0;

	/*