From b91816b191d15f722c3422a9e7c17cdf5ee76007 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 19 Nov 2008 17:11:05 +0000 Subject: tracking-2.6.28-bcd-functions-changed.patch Signed-off-by: Andy Green --- drivers/i2c/chips/pcf50633.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'drivers/i2c') diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 991e48fa96a..9ae53ac9949 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -1701,24 +1701,24 @@ struct pcf50633_time { static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50633_time *pcf) { - rtc->tm_sec = BCD2BIN(pcf->time[PCF50633_TI_SEC]); - rtc->tm_min = BCD2BIN(pcf->time[PCF50633_TI_MIN]); - rtc->tm_hour = BCD2BIN(pcf->time[PCF50633_TI_HOUR]); - rtc->tm_wday = BCD2BIN(pcf->time[PCF50633_TI_WKDAY]); - rtc->tm_mday = BCD2BIN(pcf->time[PCF50633_TI_DAY]); - rtc->tm_mon = BCD2BIN(pcf->time[PCF50633_TI_MONTH]); - rtc->tm_year = BCD2BIN(pcf->time[PCF50633_TI_YEAR]) + 100; + rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); + rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); + rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); + rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); + rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); + rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]); + rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; } static void rtc2pcf_time(struct pcf50633_time *pcf, struct rtc_time *rtc) { - pcf->time[PCF50633_TI_SEC] = BIN2BCD(rtc->tm_sec); - pcf->time[PCF50633_TI_MIN] = BIN2BCD(rtc->tm_min); - pcf->time[PCF50633_TI_HOUR] = BIN2BCD(rtc->tm_hour); - pcf->time[PCF50633_TI_WKDAY] = BIN2BCD(rtc->tm_wday); - pcf->time[PCF50633_TI_DAY] = BIN2BCD(rtc->tm_mday); - pcf->time[PCF50633_TI_MONTH] = BIN2BCD(rtc->tm_mon); - pcf->time[PCF50633_TI_YEAR] = BIN2BCD(rtc->tm_year - 100); + pcf->time[PCF50633_TI_SEC] = bin2bcd(rtc->tm_sec); + pcf->time[PCF50633_TI_MIN] = bin2bcd(rtc->tm_min); + pcf->time[PCF50633_TI_HOUR] = bin2bcd(rtc->tm_hour); + pcf->time[PCF50633_TI_WKDAY] = bin2bcd(rtc->tm_wday); + pcf->time[PCF50633_TI_DAY] = bin2bcd(rtc->tm_mday); + pcf->time[PCF50633_TI_MONTH] = bin2bcd(rtc->tm_mon); + pcf->time[PCF50633_TI_YEAR] = bin2bcd(rtc->tm_year - 100); } static int pcf50633_rtc_ioctl(struct device *dev, unsigned int cmd, -- cgit v1.2.3