aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 12:57:38 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 12:57:38 -0800
commit6977c6fc77b864dc1851e100c8528c2f3ed5bd9b (patch)
treed43b5e8e33a01ebf7a4f356342c700e4f46ec8e3 /drivers
parent8fd5e7a2d9574b3cac1c9264ad1aed3b613ed6fe (diff)
parentcf8e18ea2f8be26e8f9e44ed677d25f558ca301a (diff)
Merge branch 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull second round of PARISC updates from Helge Deller: "The most important fix in this branch is the switch of io_setup, io_getevents and io_submit syscalls to use the available compat syscalls when running 32bit userspace on 64bit kernel. Other than that it's mostly removal of compile warnings." * 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix redefinition of SET_PERSONALITY parisc: do not install modules when installing kernel parisc: fix compile warnings triggered by atomic_sub(sizeof(),v) parisc: check return value of down_interruptible() in hp_sdc_rtc.c parisc: avoid unitialized variable warning in pa_memcpy() parisc: remove unused variable 'compat_val' parisc: switch to compat_functions of io_setup, io_getevents and io_submit parisc: select ARCH_WANT_FRAME_POINTERS
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 0b4f54265f6..2e3334b8f82 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -109,7 +109,9 @@ static int hp_sdc_rtc_do_read_bbrtc (struct rtc_time *rtctm)
if (hp_sdc_enqueue_transaction(&t)) return -1;
- down_interruptible(&tsem); /* Put ourselves to sleep for results. */
+ /* Put ourselves to sleep for results. */
+ if (WARN_ON(down_interruptible(&tsem)))
+ return -1;
/* Check for nonpresence of BBRTC */
if (!((tseq[83] | tseq[90] | tseq[69] | tseq[76] |
@@ -176,11 +178,16 @@ static int64_t hp_sdc_rtc_read_i8042timer (uint8_t loadcmd, int numreg)
t.seq = tseq;
t.act.semaphore = &i8042tregs;
- down_interruptible(&i8042tregs); /* Sleep if output regs in use. */
+ /* Sleep if output regs in use. */
+ if (WARN_ON(down_interruptible(&i8042tregs)))
+ return -1;
if (hp_sdc_enqueue_transaction(&t)) return -1;
- down_interruptible(&i8042tregs); /* Sleep until results come back. */
+ /* Sleep until results come back. */
+ if (WARN_ON(down_interruptible(&i8042tregs)))
+ return -1;
+
up(&i8042tregs);
return (tseq[5] |
@@ -276,6 +283,7 @@ static inline int hp_sdc_rtc_read_ct(struct timeval *res) {
}
+#if 0 /* not used yet */
/* Set the i8042 real-time clock */
static int hp_sdc_rtc_set_rt (struct timeval *setto)
{
@@ -386,6 +394,7 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
}
return 0;
}
+#endif
static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) {