From b35692ebdef0c1cd4a05a58559a94ced54ff9c82 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 8 Mar 2007 00:14:25 +0000 Subject: [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 --- drivers/char/ds1286.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c index 6d58b03..59146e3 100644 --- a/drivers/char/ds1286.c +++ b/drivers/char/ds1286.c @@ -197,6 +197,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, hrs = alm_tm.tm_hour; min = alm_tm.tm_min; + sec = alm_tm.tm_sec; if (hrs >= 24) hrs = 0xff; @@ -204,9 +205,11 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, if (min >= 60) min = 0xff; - BIN_TO_BCD(sec); - BIN_TO_BCD(min); - BIN_TO_BCD(hrs); + if (sec != 0) + return -EINVAL; + + min = BIN2BCD(min); + min = BIN2BCD(hrs); spin_lock(&ds1286_lock); rtc_write(hrs, RTC_HOURS_ALARM); -- cgit v1.1 From 012390517e3e6734d381ff81c4a7e9817636e2f1 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 8 Mar 2007 00:45:26 +0000 Subject: [MIPS] ISA: Fix typo Lost CONFIG_ prefix discovered by Robert P. J. Day . Signed-off-by: Ralf Baechle --- include/asm-mips/dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index e06ef07..833437d 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h @@ -74,7 +74,7 @@ * */ -#ifndef GENERIC_ISA_DMA_SUPPORT_BROKEN +#ifndef CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN #define MAX_DMA_CHANNELS 8 #endif -- cgit v1.1 From b2e569d876e153365b01525a102b7d90bb309446 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 8 Mar 2007 00:47:11 +0000 Subject: [MIPS] ARC: Fix several compiler warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC arch/mips/arc/init.o arch/mips/arc/init.c: In function 'prom_init': arch/mips/arc/init.c:27: warning: ISO C90 forbids mixed declarations and code arch/mips/arc/init.c:35: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 2 has type 'ULONG' arch/mips/arc/init.c:28: warning: unused variable 'c' arch/mips/arc/init.c:27: warning: unused variable ‘cnt’ Signed-off-by: Ralf Baechle --- arch/mips/arc/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/arc/init.c b/arch/mips/arc/init.c index 0ac8f42..e2f75b1 100644 --- a/arch/mips/arc/init.c +++ b/arch/mips/arc/init.c @@ -23,16 +23,16 @@ LONG *_prom_argv, *_prom_envp; void __init prom_init(void) { PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK; + romvec = ROMVECTOR; - ULONG cnt; - CHAR c; prom_argc = fw_arg0; _prom_argv = (LONG *) fw_arg1; _prom_envp = (LONG *) fw_arg2; if (pb->magic != 0x53435241) { - printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", pb->magic); + printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", + (unsigned long) pb->magic); while(1) ; } -- cgit v1.1