rtc, rx8025: fix Coding Style
fix Coding Style for this driver. Signed-off-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
@@ -120,6 +120,7 @@ int rtc_get (struct rtc_time *tmp)
|
|||||||
else
|
else
|
||||||
tmp->tm_hour = bcd2bin(hour & 0x1F) % 12 +
|
tmp->tm_hour = bcd2bin(hour & 0x1F) % 12 +
|
||||||
((hour & 0x20) ? 12 : 0);
|
((hour & 0x20) ? 12 : 0);
|
||||||
|
|
||||||
tmp->tm_mday = bcd2bin (mday & 0x3F);
|
tmp->tm_mday = bcd2bin (mday & 0x3F);
|
||||||
tmp->tm_mon = bcd2bin (mon & 0x1F);
|
tmp->tm_mon = bcd2bin (mon & 0x1F);
|
||||||
tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000);
|
tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000);
|
||||||
@@ -186,5 +187,4 @@ static void rtc_write (uchar reg, uchar val)
|
|||||||
buf[1] = val;
|
buf[1] = val;
|
||||||
if (i2c_write(CONFIG_SYS_I2C_RTC_ADDR, 0, 0, buf, 2) != 0)
|
if (i2c_write(CONFIG_SYS_I2C_RTC_ADDR, 0, 0, buf, 2) != 0)
|
||||||
printf("Error writing to RTC\n");
|
printf("Error writing to RTC\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user