aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0b4f54265f62..2e3334b8f82d 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)
109 109
110 if (hp_sdc_enqueue_transaction(&t)) return -1; 110 if (hp_sdc_enqueue_transaction(&t)) return -1;
111 111
112 down_interruptible(&tsem); /* Put ourselves to sleep for results. */ 112 /* Put ourselves to sleep for results. */
113 if (WARN_ON(down_interruptible(&tsem)))
114 return -1;
113 115
114 /* Check for nonpresence of BBRTC */ 116 /* Check for nonpresence of BBRTC */
115 if (!((tseq[83] | tseq[90] | tseq[69] | tseq[76] | 117 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)
176 t.seq = tseq; 178 t.seq = tseq;
177 t.act.semaphore = &i8042tregs; 179 t.act.semaphore = &i8042tregs;
178 180
179 down_interruptible(&i8042tregs); /* Sleep if output regs in use. */ 181 /* Sleep if output regs in use. */
182 if (WARN_ON(down_interruptible(&i8042tregs)))
183 return -1;
180 184
181 if (hp_sdc_enqueue_transaction(&t)) return -1; 185 if (hp_sdc_enqueue_transaction(&t)) return -1;
182 186
183 down_interruptible(&i8042tregs); /* Sleep until results come back. */ 187 /* Sleep until results come back. */
188 if (WARN_ON(down_interruptible(&i8042tregs)))
189 return -1;
190
184 up(&i8042tregs); 191 up(&i8042tregs);
185 192
186 return (tseq[5] | 193 return (tseq[5] |
@@ -276,6 +283,7 @@ static inline int hp_sdc_rtc_read_ct(struct timeval *res) {
276} 283}
277 284
278 285
286#if 0 /* not used yet */
279/* Set the i8042 real-time clock */ 287/* Set the i8042 real-time clock */
280static int hp_sdc_rtc_set_rt (struct timeval *setto) 288static int hp_sdc_rtc_set_rt (struct timeval *setto)
281{ 289{
@@ -386,6 +394,7 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
386 } 394 }
387 return 0; 395 return 0;
388} 396}
397#endif
389 398
390static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, 399static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
391 size_t count, loff_t *ppos) { 400 size_t count, loff_t *ppos) {