diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:05 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:41 -0400 |
commit | 55929332c92e5d34d65a8f784604c92677ea3e15 (patch) | |
tree | 555e922d470336d07ace32bb564ac5358379a3c4 /drivers/char/genrtc.c | |
parent | 703c631ebbcadcfd861d01e697fdda7c388fec9a (diff) |
drivers: Push down BKL into various drivers
These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).
[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/char/genrtc.c')
-rw-r--r-- | drivers/char/genrtc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c index 31e7c91c2d9d..b6c2cc167c11 100644 --- a/drivers/char/genrtc.c +++ b/drivers/char/genrtc.c | |||
@@ -262,7 +262,7 @@ static inline int gen_set_rtc_irq_bit(unsigned char bit) | |||
262 | #endif | 262 | #endif |
263 | } | 263 | } |
264 | 264 | ||
265 | static int gen_rtc_ioctl(struct inode *inode, struct file *file, | 265 | static int gen_rtc_ioctl(struct file *file, |
266 | unsigned int cmd, unsigned long arg) | 266 | unsigned int cmd, unsigned long arg) |
267 | { | 267 | { |
268 | struct rtc_time wtime; | 268 | struct rtc_time wtime; |
@@ -332,6 +332,18 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file, | |||
332 | return -EINVAL; | 332 | return -EINVAL; |
333 | } | 333 | } |
334 | 334 | ||
335 | static long gen_rtc_unlocked_ioctl(struct file *file, unsigned int cmd, | ||
336 | unsigned long arg) | ||
337 | { | ||
338 | int ret; | ||
339 | |||
340 | lock_kernel(); | ||
341 | ret = gen_rtc_ioctl(file, cmd, arg); | ||
342 | unlock_kernel(); | ||
343 | |||
344 | return ret; | ||
345 | } | ||
346 | |||
335 | /* | 347 | /* |
336 | * We enforce only one user at a time here with the open/close. | 348 | * We enforce only one user at a time here with the open/close. |
337 | * Also clear the previous interrupt data on an open, and clean | 349 | * Also clear the previous interrupt data on an open, and clean |
@@ -482,7 +494,7 @@ static const struct file_operations gen_rtc_fops = { | |||
482 | .read = gen_rtc_read, | 494 | .read = gen_rtc_read, |
483 | .poll = gen_rtc_poll, | 495 | .poll = gen_rtc_poll, |
484 | #endif | 496 | #endif |
485 | .ioctl = gen_rtc_ioctl, | 497 | .unlocked_ioctl = gen_rtc_unlocked_ioctl, |
486 | .open = gen_rtc_open, | 498 | .open = gen_rtc_open, |
487 | .release = gen_rtc_release, | 499 | .release = gen_rtc_release, |
488 | }; | 500 | }; |