Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4c6c6e5c
Commit
4c6c6e5c
authored
Aug 30, 2002
by
Peter Wächtler
Committed by
Linus Torvalds
Aug 30, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] oss/opl3sa2.c - convert cli to spinlocks
parent
0b5bb847
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sound/oss/opl3sa2.c
sound/oss/opl3sa2.c
+6
-6
No files found.
sound/oss/opl3sa2.c
View file @
4c6c6e5c
...
...
@@ -149,6 +149,8 @@ static struct address_info cfg[OPL3SA2_CARDS_MAX];
static
struct
address_info
cfg_mss
[
OPL3SA2_CARDS_MAX
];
static
struct
address_info
cfg_mpu
[
OPL3SA2_CARDS_MAX
];
static
spinlock_t
lock
=
SPIN_LOCK_UNLOCKED
;
/* Our parameters */
static
int
__initdata
io
=
-
1
;
static
int
__initdata
mss_io
=
-
1
;
...
...
@@ -927,8 +929,7 @@ static int opl3sa2_suspend(struct pm_dev *pdev, unsigned char pm_mode)
if
(
!
pdev
)
return
-
EINVAL
;
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
lock
,
flags
);
p
=
(
opl3sa2_mixerdata
*
)
pdev
->
data
;
p
->
in_suspend
=
1
;
...
...
@@ -951,7 +952,7 @@ static int opl3sa2_suspend(struct pm_dev *pdev, unsigned char pm_mode)
opl3sa2_read
(
p
->
cfg_port
,
OPL3SA2_PM
,
&
p
->
reg
);
opl3sa2_write
(
p
->
cfg_port
,
OPL3SA2_PM
,
p
->
reg
|
pm_mode
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
lock
,
flags
);
return
0
;
}
...
...
@@ -964,15 +965,14 @@ static int opl3sa2_resume(struct pm_dev *pdev)
return
-
EINVAL
;
p
=
(
opl3sa2_mixerdata
*
)
pdev
->
data
;
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
lock
,
flags
);
/* I don't think this is necessary */
opl3sa2_write
(
p
->
cfg_port
,
OPL3SA2_PM
,
p
->
reg
);
opl3sa2_mixer_restore
(
p
,
p
->
card
);
p
->
in_suspend
=
0
;
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
lock
,
flags
);
return
0
;
}
...
...
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