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
78a3c3d7
Commit
78a3c3d7
authored
May 15, 2008
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sound: cdev lock_kernel() pushdown
Signed-off-by:
Jonathan Corbet
<
corbet@lwn.net
>
parent
fc7f687a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
sound/core/sound.c
sound/core/sound.c
+14
-1
sound/sound_core.c
sound/sound_core.c
+5
-0
No files found.
sound/core/sound.c
View file @
78a3c3d7
...
...
@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/time.h>
#include <linux/device.h>
#include <linux/moduleparam.h>
...
...
@@ -121,7 +122,7 @@ void *snd_lookup_minor_data(unsigned int minor, int type)
EXPORT_SYMBOL
(
snd_lookup_minor_data
);
static
int
snd_open
(
struct
inode
*
inode
,
struct
file
*
file
)
static
int
__
snd_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
unsigned
int
minor
=
iminor
(
inode
);
struct
snd_minor
*
mptr
=
NULL
;
...
...
@@ -163,6 +164,18 @@ static int snd_open(struct inode *inode, struct file *file)
return
err
;
}
/* BKL pushdown: nasty #ifdef avoidance wrapper */
static
int
snd_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
int
ret
;
lock_kernel
();
ret
=
__snd_open
(
inode
,
file
);
unlock_kernel
();
return
ret
;
}
static
const
struct
file_operations
snd_fops
=
{
.
owner
=
THIS_MODULE
,
...
...
sound/sound_core.c
View file @
78a3c3d7
...
...
@@ -37,6 +37,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
...
...
@@ -464,6 +465,8 @@ int soundcore_open(struct inode *inode, struct file *file)
struct
sound_unit
*
s
;
const
struct
file_operations
*
new_fops
=
NULL
;
lock_kernel
();
chain
=
unit
&
0x0F
;
if
(
chain
==
4
||
chain
==
5
)
/* dsp/audio/dsp16 */
{
...
...
@@ -511,9 +514,11 @@ int soundcore_open(struct inode *inode, struct file *file)
file
->
f_op
=
fops_get
(
old_fops
);
}
fops_put
(
old_fops
);
unlock_kernel
();
return
err
;
}
spin_unlock
(
&
sound_loader_lock
);
unlock_kernel
();
return
-
ENODEV
;
}
...
...
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