Commit b1c3c898 authored by David Brownell's avatar David Brownell Committed by Linus Torvalds

revert "rtc: cdev lock_kernel() pushdown"

Revert commit 51a776fa ("rtc: cdev
lock_kernel() pushdown").  The RTC framework does not need BKL
protection.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9623e078
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/smp_lock.h>
#include "rtc-core.h" #include "rtc-core.h"
static dev_t rtc_devt; static dev_t rtc_devt;
...@@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file) ...@@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
struct rtc_device, char_dev); struct rtc_device, char_dev);
const struct rtc_class_ops *ops = rtc->ops; const struct rtc_class_ops *ops = rtc->ops;
lock_kernel(); if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { return -EBUSY;
err = -EBUSY;
goto out;
}
file->private_data = rtc; file->private_data = rtc;
...@@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file) ...@@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
rtc->irq_data = 0; rtc->irq_data = 0;
spin_unlock_irq(&rtc->irq_lock); spin_unlock_irq(&rtc->irq_lock);
goto out; return 0;
} }
/* something has gone wrong */ /* something has gone wrong */
clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
out:
unlock_kernel();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment