aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32/drivers/pcf8563.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32/drivers/pcf8563.c')
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index bef6eb53b153..bdcac9dec5cb 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -24,7 +24,6 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/fs.h> 25#include <linux/fs.h>
26#include <linux/ioctl.h> 26#include <linux/ioctl.h>
27#include <linux/smp_lock.h>
28#include <linux/delay.h> 27#include <linux/delay.h>
29#include <linux/bcd.h> 28#include <linux/bcd.h>
30#include <linux/mutex.h> 29#include <linux/mutex.h>
@@ -45,6 +44,7 @@
45#define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) 44#define rtc_read(x) i2c_readreg(RTC_I2C_READ, x)
46#define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) 45#define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y)
47 46
47static DEFINE_MUTEX(pcf8563_mutex);
48static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ 48static DEFINE_MUTEX(rtc_lock); /* Protect state etc */
49 49
50static const unsigned char days_in_month[] = 50static const unsigned char days_in_month[] =
@@ -339,9 +339,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned
339{ 339{
340 int ret; 340 int ret;
341 341
342 lock_kernel(); 342 mutex_lock(&pcf8563_mutex);
343 return pcf8563_ioctl(filp, cmd, arg); 343 return pcf8563_ioctl(filp, cmd, arg);
344 unlock_kernel(); 344 mutex_unlock(&pcf8563_mutex);
345 345
346 return ret; 346 return ret;
347} 347}