diff options
author | Pali Rohár <pali@kernel.org> | 2022-04-12 11:20:41 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-21 14:32:40 -0400 |
commit | e523f5d181ce66a36b5f9476b86be2fa03284a45 (patch) | |
tree | aff5f216aaef505eb5d409f59e53a77e7be313cc /fs/ubifs | |
parent | bb3d71b7eff4f137c1c4560950536aeb1740e004 (diff) | |
download | u-boot-e523f5d181ce66a36b5f9476b86be2fa03284a45.tar.gz u-boot-e523f5d181ce66a36b5f9476b86be2fa03284a45.tar.bz2 u-boot-e523f5d181ce66a36b5f9476b86be2fa03284a45.zip |
crc16: Rename fs/ubifs/crc16.h to include/linux/crc16.h
File fs/ubifs/crc16.h is standard linux's crc16.h include file. So move it
from fs/ubifs to include/linux where are also other linux include files.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/crc16.c | 2 | ||||
-rw-r--r-- | fs/ubifs/crc16.h | 29 | ||||
-rw-r--r-- | fs/ubifs/lpt.c | 2 | ||||
-rw-r--r-- | fs/ubifs/lpt_commit.c | 2 |
4 files changed, 3 insertions, 32 deletions
diff --git a/fs/ubifs/crc16.c b/fs/ubifs/crc16.c index 443ccf855d..7cf33fc7eb 100644 --- a/fs/ubifs/crc16.c +++ b/fs/ubifs/crc16.c @@ -6,7 +6,7 @@ */ #include <linux/types.h> -#include "crc16.h" +#include <linux/crc16.h> /** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ u16 const crc16_table[256] = { diff --git a/fs/ubifs/crc16.h b/fs/ubifs/crc16.h deleted file mode 100644 index 052fd3311a..0000000000 --- a/fs/ubifs/crc16.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * crc16.h - CRC-16 routine - * - * Implements the standard CRC-16: - * Width 16 - * Poly 0x8005 (x^16 + x^15 + x^2 + 1) - * Init 0 - * - * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> - * - * This source code is licensed under the GNU General Public License, - * Version 2. See the file COPYING for more details. - */ - -#ifndef __CRC16_H -#define __CRC16_H - -#include <linux/types.h> - -extern u16 const crc16_table[256]; - -extern u16 crc16(u16 crc, const u8 *buffer, size_t len); - -static inline u16 crc16_byte(u16 crc, const u8 data) -{ - return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff]; -} - -#endif /* __CRC16_H */ diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 62748b0210..27835e60d2 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c @@ -42,7 +42,7 @@ #include <linux/compat.h> #include <linux/err.h> #include <ubi_uboot.h> -#include "crc16.h" +#include <linux/crc16.h> #endif /** diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 897d001430..ba0b19a1f2 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c @@ -23,7 +23,7 @@ #include <linux/bitops.h> #include <linux/compat.h> #include <linux/err.h> -#include "crc16.h" +#include <linux/crc16.h> #endif #include "ubifs.h" |