aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/efirtc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index 34d15d54823..26a47dc88f6 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -27,8 +27,6 @@
27 * - Add module support 27 * - Add module support
28 */ 28 */
29 29
30
31#include <linux/smp_lock.h>
32#include <linux/types.h> 30#include <linux/types.h>
33#include <linux/errno.h> 31#include <linux/errno.h>
34#include <linux/miscdevice.h> 32#include <linux/miscdevice.h>
@@ -174,13 +172,12 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
174 return -EINVAL; 172 return -EINVAL;
175 173
176 case RTC_RD_TIME: 174 case RTC_RD_TIME:
177 lock_kernel();
178 spin_lock_irqsave(&efi_rtc_lock, flags); 175 spin_lock_irqsave(&efi_rtc_lock, flags);
179 176
180 status = efi.get_time(&eft, &cap); 177 status = efi.get_time(&eft, &cap);
181 178
182 spin_unlock_irqrestore(&efi_rtc_lock,flags); 179 spin_unlock_irqrestore(&efi_rtc_lock,flags);
183 unlock_kernel(); 180
184 if (status != EFI_SUCCESS) { 181 if (status != EFI_SUCCESS) {
185 /* should never happen */ 182 /* should never happen */
186 printk(KERN_ERR "efitime: can't read time\n"); 183 printk(KERN_ERR "efitime: can't read time\n");
@@ -202,13 +199,11 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
202 199
203 convert_to_efi_time(&wtime, &eft); 200 convert_to_efi_time(&wtime, &eft);
204 201
205 lock_kernel();
206 spin_lock_irqsave(&efi_rtc_lock, flags); 202 spin_lock_irqsave(&efi_rtc_lock, flags);
207 203
208 status = efi.set_time(&eft); 204 status = efi.set_time(&eft);
209 205
210 spin_unlock_irqrestore(&efi_rtc_lock,flags); 206 spin_unlock_irqrestore(&efi_rtc_lock,flags);
211 unlock_kernel();
212 207
213 return status == EFI_SUCCESS ? 0 : -EINVAL; 208 return status == EFI_SUCCESS ? 0 : -EINVAL;
214 209
@@ -224,7 +219,6 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
224 219
225 convert_to_efi_time(&wtime, &eft); 220 convert_to_efi_time(&wtime, &eft);
226 221
227 lock_kernel();
228 spin_lock_irqsave(&efi_rtc_lock, flags); 222 spin_lock_irqsave(&efi_rtc_lock, flags);
229 /* 223 /*
230 * XXX Fixme: 224 * XXX Fixme:
@@ -235,19 +229,16 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
235 status = efi.set_wakeup_time((efi_bool_t)enabled, &eft); 229 status = efi.set_wakeup_time((efi_bool_t)enabled, &eft);
236 230
237 spin_unlock_irqrestore(&efi_rtc_lock,flags); 231 spin_unlock_irqrestore(&efi_rtc_lock,flags);
238 unlock_kernel();
239 232
240 return status == EFI_SUCCESS ? 0 : -EINVAL; 233 return status == EFI_SUCCESS ? 0 : -EINVAL;
241 234
242 case RTC_WKALM_RD: 235 case RTC_WKALM_RD:
243 236
244 lock_kernel();
245 spin_lock_irqsave(&efi_rtc_lock, flags); 237 spin_lock_irqsave(&efi_rtc_lock, flags);
246 238
247 status = efi.get_wakeup_time((efi_bool_t *)&enabled, (efi_bool_t *)&pending, &eft); 239 status = efi.get_wakeup_time((efi_bool_t *)&enabled, (efi_bool_t *)&pending, &eft);
248 240
249 spin_unlock_irqrestore(&efi_rtc_lock,flags); 241 spin_unlock_irqrestore(&efi_rtc_lock,flags);
250 unlock_kernel();
251 242
252 if (status != EFI_SUCCESS) return -EINVAL; 243 if (status != EFI_SUCCESS) return -EINVAL;
253 244
@@ -277,7 +268,6 @@ static int efi_rtc_open(struct inode *inode, struct file *file)
277 * We do accept multiple open files at the same time as we 268 * We do accept multiple open files at the same time as we
278 * synchronize on the per call operation. 269 * synchronize on the per call operation.
279 */ 270 */
280 cycle_kernel_lock();
281 return 0; 271 return 0;
282} 272}
283 273