fimc-is: fix crc32 code for arm64
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Jul 2015 08:59:37 +0000 (10:59 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:47:36 +0000 (13:47 +0900)
fimc-is: Fix getCRC() function return type

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos/fimc-is/crc32.c
drivers/media/platform/exynos/fimc-is/crc32.h

index 5aae140..5a0d80e 100644 (file)
@@ -14,9 +14,9 @@
 
 /* #define DEBUG_CRC */
 
-static void makeCRCtable(unsigned long *table, unsigned long id)
+static void makeCRCtable(unsigned int *table, unsigned int id)
 {
-       unsigned long i, j, k;
+       unsigned int i, j, k;
 
        for(i = 0; i < 256; ++i) {
                k = i;
@@ -32,16 +32,16 @@ static void makeCRCtable(unsigned long *table, unsigned long id)
        }
 }
 
-unsigned long getCRC(volatile unsigned short *mem, signed long count,
+static unsigned int table[256];
+
+unsigned int getCRC(volatile unsigned short *mem, signed long count,
        volatile unsigned short *crcH, volatile unsigned short *crcL)
 {
        unsigned char mem0, mem1;
        int i;
-       unsigned long CRC = 0;
-#ifndef DEBUG_CRC
-       unsigned long table[256];
-#else
-       unsigned long table[256] = {
+       unsigned int CRC = 0;
+#ifdef DEBUG_CRC
+       unsigned int table[256] = {
                0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
                0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
                0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
index 324793c..74911ac 100644 (file)
@@ -13,7 +13,7 @@
 #define CRC32_H
 
 /* unit of count is 2byte */
-unsigned long getCRC(volatile unsigned short *mem, signed long count,
+unsigned int getCRC(volatile unsigned short *mem, signed long count,
        volatile unsigned short *crcH, volatile unsigned short *crcL);
 
 #endif