Re: [PATCH 14/14] RTC: Remove some duplicate BCD definitions

From: Andrew Morton
Date: Sat Mar 18 2006 - 00:55:28 EST


Matt Mackall <mpm@xxxxxxxxxxx> wrote:
>
> Remove some duplicate BCD definitions

Needed fixups in arch/m68k/bvme6000/rtc.c due to overlapping changes in
m68k-rtc-driver-cleanup.patch. Please check the result.

***************
*** 18,23 ****
#include <linux/module.h>
#include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */
#include <linux/smp_lock.h>
#include <asm/bvme6000hw.h>

#include <asm/io.h>
--- 18,24 ----
#include <linux/module.h>
#include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */
#include <linux/smp_lock.h>
+ #include <linux/bcd.h>
#include <asm/bvme6000hw.h>

#include <asm/io.h>
***************
*** 32,40 ****
* ioctls.
*/

- #define BCD2BIN(val) (((val)&15) + ((val)>>4)*10)
- #define BIN2BCD(val) ((((val)/10)<<4) + (val)%10)
-
static unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

--- 33,38 ----
* ioctls.
*/

static unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/