projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
938179b
)
x86/microcode: Use nonseekable_open()
author
Arnd Bergmann
<
[email protected]
>
Sat, 10 Apr 2010 14:46:21 +0000
(16:46 +0200)
committer
Ingo Molnar
<
[email protected]
>
Wed, 14 Apr 2010 10:27:34 +0000
(12:27 +0200)
No need to seek on this file, so prevent it outright so we can
avoid using default_llseek - removes one more BKL usage.
Signed-off-by: Arnd Bergmann <
[email protected]
>
[drop useless llseek = no_llseek and smp_lock.h inclusion]
Signed-off-by: Frederic Weisbecker <
[email protected]
>
Cc: Arnd Bergmann <
[email protected]
>
Cc: H. Peter Anvin <
[email protected]
>
Cc: Dmitry Adamushko <
[email protected]
>
LKML-Reference: <
1270910781
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/microcode_core.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/microcode_core.c
b/arch/x86/kernel/microcode_core.c
index cceb5bc3c3c258c2a6f1957ee152f00c7310d462..2cd8c544e41a22a224c8f29f3f517e609c60536e 100644
(file)
--- a/
arch/x86/kernel/microcode_core.c
+++ b/
arch/x86/kernel/microcode_core.c
@@
-201,9
+201,9
@@
static int do_microcode_update(const void __user *buf, size_t size)
return error;
}
-static int microcode_open(struct inode *
unused1, struct file *unused2
)
+static int microcode_open(struct inode *
inode, struct file *file
)
{
- return capable(CAP_SYS_RAWIO) ?
0
: -EPERM;
+ return capable(CAP_SYS_RAWIO) ?
nonseekable_open(inode, file)
: -EPERM;
}
static ssize_t microcode_write(struct file *file, const char __user *buf,