aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/crc32.c
diff options
context:
space:
mode:
authorHeiko Schocher2014-06-24 10:10:04 +0200
committerTom Rini2014-08-25 19:25:55 -0400
commitff94bc40af3481d47546595ba73c136de6af6929 (patch)
tree858119077e2ca8a992589185c36bd431e4a8c80e /drivers/mtd/ubi/crc32.c
parent0c06db59836746c5caf397e642cd0f2bf1cc20a6 (diff)
mtd, ubi, ubifs: resync with Linux-3.14
resync ubi subsystem with linux: commit 455c6fdbd219161bd09b1165f11699d6d73de11c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Mar 30 20:40:15 2014 -0700 Linux 3.14 A nice side effect of this, is we introduce UBI Fastmap support to U-Boot. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Tom Rini <trini@ti.com> Cc: Marek Vasut <marex@denx.de> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Scott Wood <scottwood@freescale.com> Cc: Joerg Krause <jkrause@posteo.de>
Diffstat (limited to 'drivers/mtd/ubi/crc32.c')
-rw-r--r--drivers/mtd/ubi/crc32.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/crc32.c b/drivers/mtd/ubi/crc32.c
index f1bebf58c12..0d65bf4b8a5 100644
--- a/drivers/mtd/ubi/crc32.c
+++ b/drivers/mtd/ubi/crc32.c
@@ -20,7 +20,8 @@
* Version 2. See the file COPYING for more details.
*/
-#ifdef UBI_LINUX
+#define __UBOOT__
+#ifndef __UBOOT__
#include <linux/crc32.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -30,7 +31,7 @@
#include <asm/byteorder.h>
-#ifdef UBI_LINUX
+#ifndef __UBOOT__
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/atomic.h>
@@ -46,7 +47,7 @@
#define tobe(x) (x)
#endif
#include "crc32table.h"
-#ifdef UBI_LINUX
+#ifndef __UBOOT__
MODULE_AUTHOR("Matt Domsch <Matt_Domsch@dell.com>");
MODULE_DESCRIPTION("Ethernet CRC32 calculations");
MODULE_LICENSE("GPL");
@@ -146,7 +147,7 @@ u32 crc32_le(u32 crc, unsigned char const *p, size_t len)
# endif
}
#endif
-#ifdef UBI_LINUX
+#ifndef __UBOOT__
/**
* crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32
* @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for
@@ -379,7 +380,7 @@ EXPORT_SYMBOL(crc32_be);
#include <stdlib.h>
#include <stdio.h>
-#ifdef UBI_LINUX /*Not used at present */
+#ifndef __UBOOT__
static void
buf_dump(char const *prefix, unsigned char const *buf, size_t len)
{
@@ -405,7 +406,7 @@ static void random_garbage(unsigned char *buf, size_t len)
*buf++ = (unsigned char) random();
}
-#ifdef UBI_LINUX /* Not used at present */
+#ifndef __UBOOT__
static void store_le(u32 x, unsigned char *buf)
{
buf[0] = (unsigned char) x;