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
Kirill Smelkov
linux
Commits
0b5bb847
Commit
0b5bb847
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/opl3sa.c - convert cli to spinlocks
parent
386c8a8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
sound/oss/opl3sa.c
sound/oss/opl3sa.c
+6
-7
No files found.
sound/oss/opl3sa.c
View file @
0b5bb847
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#undef SB_OK
#undef SB_OK
...
@@ -37,7 +38,7 @@ static int sb_initialized = 0;
...
@@ -37,7 +38,7 @@ static int sb_initialized = 0;
static
int
kilroy_was_here
=
0
;
/* Don't detect twice */
static
int
kilroy_was_here
=
0
;
/* Don't detect twice */
static
int
mpu_initialized
=
0
;
static
int
mpu_initialized
=
0
;
static
spinlock_t
lock
=
SPIN_LOCK_UNLOCKED
;
static
int
*
opl3sa_osp
=
NULL
;
static
int
*
opl3sa_osp
=
NULL
;
static
unsigned
char
opl3sa_read
(
int
addr
)
static
unsigned
char
opl3sa_read
(
int
addr
)
...
@@ -45,12 +46,11 @@ static unsigned char opl3sa_read(int addr)
...
@@ -45,12 +46,11 @@ static unsigned char opl3sa_read(int addr)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
char
tmp
;
unsigned
char
tmp
;
save_flags
(
flags
);
spin_lock_irqsave
(
&
lock
,
flags
);
cli
();
outb
((
0x1d
),
0xf86
);
/* password */
outb
((
0x1d
),
0xf86
);
/* password */
outb
(((
unsigned
char
)
addr
),
0xf86
);
/* address */
outb
(((
unsigned
char
)
addr
),
0xf86
);
/* address */
tmp
=
inb
(
0xf87
);
/* data */
tmp
=
inb
(
0xf87
);
/* data */
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
lock
,
flags
);
return
tmp
;
return
tmp
;
}
}
...
@@ -59,12 +59,11 @@ static void opl3sa_write(int addr, int data)
...
@@ -59,12 +59,11 @@ static void opl3sa_write(int addr, int data)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
save_flags
(
flags
);
spin_lock_irqsave
(
&
lock
,
flags
);
cli
();
outb
((
0x1d
),
0xf86
);
/* password */
outb
((
0x1d
),
0xf86
);
/* password */
outb
(((
unsigned
char
)
addr
),
0xf86
);
/* address */
outb
(((
unsigned
char
)
addr
),
0xf86
);
/* address */
outb
(((
unsigned
char
)
data
),
0xf87
);
/* data */
outb
(((
unsigned
char
)
data
),
0xf87
);
/* data */
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
lock
,
flags
);
}
}
static
int
__init
opl3sa_detect
(
void
)
static
int
__init
opl3sa_detect
(
void
)
...
...
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