diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
commit | f13771187b9423b824f32518319f6da85d819003 (patch) | |
tree | c431cf16c286065a302d5f3fb43fc1abac7e4047 /drivers/char/genrtc.c | |
parent | 15953654cc312429740fd58fb37a5a3d63a54376 (diff) | |
parent | 9f37af654fda88a8dcca74c785f6c20e52758866 (diff) |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
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 | }; |