mtd: afs: break out v1 footer magic to a define
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Oct 2015 13:08:46 +0000 (15:08 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 11 Nov 2015 01:56:06 +0000 (17:56 -0800)
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: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/afs.c

index 9af00528586f74abd8a235ef54f84c9802cc8555..d09280ae12bd97089b9d97956a7de91e0bbddc72 100644 (file)
@@ -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;
 
        /*