Revision fd6988496e79a6a4bdb514a4655d2920209eb85d authored by Linus Torvalds on 29 December 2019, 23:29:16 UTC, committed by Linus Torvalds on 29 December 2019, 23:29:16 UTC
1 parent a99efa0
bcd.c
// SPDX-License-Identifier: GPL-2.0
#include <linux/bcd.h>
#include <linux/export.h>
unsigned _bcd2bin(unsigned char val)
{
return (val & 0x0f) + (val >> 4) * 10;
}
EXPORT_SYMBOL(_bcd2bin);
unsigned char _bin2bcd(unsigned val)
{
return ((val / 10) << 4) + val % 10;
}
EXPORT_SYMBOL(_bin2bcd);
Computing file changes ...