From: Malcolm Priestley Date: Sun, 17 Aug 2014 19:42:25 +0000 (+0100) Subject: staging: vt6655: Use ether_crc in kernel. X-Git-Tag: v3.18-rc1~130^2~972 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b39d60c1dea7389e3dcd1580f59b6717fa6b0159;p=karo-tx-linux.git staging: vt6655: Use ether_crc in kernel. ether_crc is already in kernel remove local code and include linux/crc32.h Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index e4c52925a112..fadebe969e6a 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -49,6 +49,7 @@ #include #include #include +#include //#include #include #include diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index a44233c2dd29..95460d445623 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2561,23 +2561,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) return IRQ_RETVAL(handled); } -static unsigned const ethernet_polynomial = 0x04c11db7U; -static inline u32 ether_crc(int length, unsigned char *data) -{ - int crc = -1; - - while (--length >= 0) { - unsigned char current_octet = *data++; - int bit; - - for (bit = 0; bit < 8; bit++, current_octet >>= 1) { - crc = (crc << 1) ^ - ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0); - } - } - return crc; -} - //2008-8-4 by chester static int Config_FileGetParameter(unsigned char *string, unsigned char *dest, unsigned char *source)