Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
2edbf853
Commit
2edbf853
authored
May 15, 2008
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: cdev lock_kernel() pushdown
Signed-off-by:
Jonathan Corbet
<
corbet@lwn.net
>
parent
702e57d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
drivers/input/input.c
drivers/input/input.c
+12
-4
No files found.
drivers/input/input.c
View file @
2edbf853
...
...
@@ -21,6 +21,7 @@
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/rcupdate.h>
#include <linux/smp_lock.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@suse.cz>"
);
MODULE_DESCRIPTION
(
"Input core"
);
...
...
@@ -1588,13 +1589,17 @@ EXPORT_SYMBOL(input_unregister_handle);
static
int
input_open_file
(
struct
inode
*
inode
,
struct
file
*
file
)
{
struct
input_handler
*
handler
=
input_table
[
iminor
(
inode
)
>>
5
]
;
struct
input_handler
*
handler
;
const
struct
file_operations
*
old_fops
,
*
new_fops
=
NULL
;
int
err
;
lock_kernel
();
/* No load-on-demand here? */
if
(
!
handler
||
!
(
new_fops
=
fops_get
(
handler
->
fops
)))
return
-
ENODEV
;
handler
=
input_table
[
iminor
(
inode
)
>>
5
];
if
(
!
handler
||
!
(
new_fops
=
fops_get
(
handler
->
fops
)))
{
err
=
-
ENODEV
;
goto
out
;
}
/*
* That's _really_ odd. Usually NULL ->open means "nothing special",
...
...
@@ -1602,7 +1607,8 @@ static int input_open_file(struct inode *inode, struct file *file)
*/
if
(
!
new_fops
->
open
)
{
fops_put
(
new_fops
);
return
-
ENODEV
;
err
=
-
ENODEV
;
goto
out
;
}
old_fops
=
file
->
f_op
;
file
->
f_op
=
new_fops
;
...
...
@@ -1614,6 +1620,8 @@ static int input_open_file(struct inode *inode, struct file *file)
file
->
f_op
=
fops_get
(
old_fops
);
}
fops_put
(
old_fops
);
out:
unlock_kernel
();
return
err
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment