block: simplify the block device claiming interface
[linux-2.6-microblaze.git] / lib / gen_crc32table.c
index 8f26660..f755b99 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
+#include "../include/linux/crc32poly.h"
 #include "../include/generated/autoconf.h"
 #include "crc32defs.h"
 #include <inttypes.h>
@@ -57,7 +58,7 @@ static void crc32init_le_generic(const uint32_t polynomial,
 
 static void crc32init_le(void)
 {
-       crc32init_le_generic(CRCPOLY_LE, crc32table_le);
+       crc32init_le_generic(CRC32_POLY_LE, crc32table_le);
 }
 
 static void crc32cinit_le(void)
@@ -76,7 +77,7 @@ static void crc32init_be(void)
        crc32table_be[0][0] = 0;
 
        for (i = 1; i < BE_TABLE_SIZE; i <<= 1) {
-               crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0);
+               crc = (crc << 1) ^ ((crc & 0x80000000) ? CRC32_POLY_BE : 0);
                for (j = 0; j < i; j++)
                        crc32table_be[0][i + j] = crc ^ crc32table_be[0][j];
        }