diff options
Diffstat (limited to 'arch/cris/arch-v32/drivers/pcf8563.c')
-rw-r--r-- | arch/cris/arch-v32/drivers/pcf8563.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index bef6eb53b153..b6e4fc0aad42 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 | ||
47 | static DEFINE_MUTEX(pcf8563_mutex); | ||
48 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ | 48 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ |
49 | 49 | ||
50 | static const unsigned char days_in_month[] = | 50 | static const unsigned char days_in_month[] = |
@@ -60,6 +60,7 @@ static int voltage_low; | |||
60 | static const struct file_operations pcf8563_fops = { | 60 | static const struct file_operations pcf8563_fops = { |
61 | .owner = THIS_MODULE, | 61 | .owner = THIS_MODULE, |
62 | .unlocked_ioctl = pcf8563_unlocked_ioctl, | 62 | .unlocked_ioctl = pcf8563_unlocked_ioctl, |
63 | .llseek = noop_llseek, | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | unsigned char | 66 | unsigned char |
@@ -339,9 +340,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned | |||
339 | { | 340 | { |
340 | int ret; | 341 | int ret; |
341 | 342 | ||
342 | lock_kernel(); | 343 | mutex_lock(&pcf8563_mutex); |
343 | return pcf8563_ioctl(filp, cmd, arg); | 344 | return pcf8563_ioctl(filp, cmd, arg); |
344 | unlock_kernel(); | 345 | mutex_unlock(&pcf8563_mutex); |
345 | 346 | ||
346 | return ret; | 347 | return ret; |
347 | } | 348 | } |