Skip to content

Commit 5fb7f87

Browse files
geertutorvalds
authored andcommitted
lib: add module support to crc32 tests
Extract the crc32 test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 738bc38 commit 5fb7f87

File tree

4 files changed

+858
-826
lines changed

4 files changed

+858
-826
lines changed

lib/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ config CRC32
103103
functions require M here.
104104

105105
config CRC32_SELFTEST
106-
bool "CRC32 perform self test on init"
107-
default n
106+
tristate "CRC32 perform self test on init"
108107
depends on CRC32
109108
help
110109
This option enables the CRC32 library functions to perform a

lib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ obj-$(CONFIG_CRC16) += crc16.o
9292
obj-$(CONFIG_CRC_T10DIF)+= crc-t10dif.o
9393
obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o
9494
obj-$(CONFIG_CRC32) += crc32.o
95+
obj-$(CONFIG_CRC32_SELFTEST) += crc32test.o
9596
obj-$(CONFIG_CRC7) += crc7.o
9697
obj-$(CONFIG_LIBCRC32C) += libcrc32c.o
9798
obj-$(CONFIG_CRC8) += crc8.o

0 commit comments

Comments
 (0)