diff --git a/sys/compat/linuxkpi/common/include/linux/bcd.h b/sys/compat/linuxkpi/common/include/linux/bcd.h index 57fcb4c6bd98..8a40da1a330b 100644 --- a/sys/compat/linuxkpi/common/include/linux/bcd.h +++ b/sys/compat/linuxkpi/common/include/linux/bcd.h @@ -31,23 +31,15 @@ #define _LINUXKPI_LINUX_BCD_H #include +#include -/* - * We could use libkern, but we need the argument truncating. - * - * This leaves us with a duplicate symbol with conflicting types - * so we cannot simply re-define as libkern.h gets included in - * too many places directly or indirectly. This means for now - * drivers will have to be adjusted to call linuxkpi_bcd2bin(). - */ +/* Compared to the libkern version this one truncates the argument. */ static inline uint8_t linuxkpi_bcd2bin(uint8_t x) { - return (x & 0x0f) + (x >> 4) * 10; + return (bcd2bin(x)); } -#if 0 #define bcd2bin(_x) linuxkpi_bcd2bin(_x) -#endif #endif /* _LINUXKPI_LINUX_BCD_H */