Commit be47aa65 authored by Simon Glass's avatar Simon Glass

dm: Remove unnecessary types in bcd.h

We don't need to use u8, and if we avoid it, it isn't so much of a problem
that rtc.h includes this header. With this change we can include rtc.h from
sandbox files.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 71420983
......@@ -10,14 +10,12 @@
#ifndef _BCD_H
#define _BCD_H
#include <linux/types.h>
static inline unsigned int bcd2bin(u8 val)
static inline unsigned int bcd2bin(unsigned int val)
{
return ((val) & 0x0f) + ((val) >> 4) * 10;
return ((val) & 0x0f) + ((val & 0xff) >> 4) * 10;
}
static inline u8 bin2bcd (unsigned int val)
static inline unsigned int bin2bcd(unsigned int val)
{
return (((val / 10) << 4) | (val % 10));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment