[CHAR] ds1286: Fix handling of seconds in RTC_ALM_SET ioctl.
commit02a4fe9855d2632e31003bcf1034ed195563f5a1
authorRalf Baechle <ralf@linux-mips.org>
Thu, 8 Mar 2007 00:14:25 +0000 (8 00:14 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 8 Mar 2007 00:14:25 +0000 (8 00:14 +0000)
treecd6d9015369b5c109d34a1fbbfc63cfb24b634df
parent0a2802494ab88fbdab3b747401bffb031c905d89
[CHAR] ds1286: Fix handling of seconds in RTC_ALM_SET ioctl.

 o Fix use of uninitialized variable sec.
 o Make the RTC_ALM_SET ioctl return -EINVAL for non-zero seconds - the
   DS1286 has no second field for the alarm time.
 o Replace the obscure BIN_TO_BCD macro with BIN2BCD.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/char/ds1286.c