Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173200
b: refs/heads/master
c: a5ee6dc
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Oct 14, 2009
1 parent 353a363 commit a33c54d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2d23559857e5f34762c61487f8ffb2fa4d7442d
refs/heads/master: a5ee6dc9ebe8fc2640ee3fbf2c340bd853e2fd36
12 changes: 1 addition & 11 deletions trunk/drivers/char/efirtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
* - Add module support
*/


#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
Expand Down Expand Up @@ -174,13 +172,12 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
return -EINVAL;

case RTC_RD_TIME:
lock_kernel();
spin_lock_irqsave(&efi_rtc_lock, flags);

status = efi.get_time(&eft, &cap);

spin_unlock_irqrestore(&efi_rtc_lock,flags);
unlock_kernel();

if (status != EFI_SUCCESS) {
/* should never happen */
printk(KERN_ERR "efitime: can't read time\n");
Expand All @@ -202,13 +199,11 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,

convert_to_efi_time(&wtime, &eft);

lock_kernel();
spin_lock_irqsave(&efi_rtc_lock, flags);

status = efi.set_time(&eft);

spin_unlock_irqrestore(&efi_rtc_lock,flags);
unlock_kernel();

return status == EFI_SUCCESS ? 0 : -EINVAL;

Expand All @@ -224,7 +219,6 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,

convert_to_efi_time(&wtime, &eft);

lock_kernel();
spin_lock_irqsave(&efi_rtc_lock, flags);
/*
* XXX Fixme:
Expand All @@ -235,19 +229,16 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
status = efi.set_wakeup_time((efi_bool_t)enabled, &eft);

spin_unlock_irqrestore(&efi_rtc_lock,flags);
unlock_kernel();

return status == EFI_SUCCESS ? 0 : -EINVAL;

case RTC_WKALM_RD:

lock_kernel();
spin_lock_irqsave(&efi_rtc_lock, flags);

status = efi.get_wakeup_time((efi_bool_t *)&enabled, (efi_bool_t *)&pending, &eft);

spin_unlock_irqrestore(&efi_rtc_lock,flags);
unlock_kernel();

if (status != EFI_SUCCESS) return -EINVAL;

Expand Down Expand Up @@ -277,7 +268,6 @@ static int efi_rtc_open(struct inode *inode, struct file *file)
* We do accept multiple open files at the same time as we
* synchronize on the per call operation.
*/
cycle_kernel_lock();
return 0;
}

Expand Down

0 comments on commit a33c54d

Please sign in to comment.