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
0163a9e3
Commit
0163a9e3
authored
Oct 05, 2002
by
Jaroslav Kysela
Committed by
Linus Torvalds
Oct 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix sgalaxy.c driver cli/sti code.
parent
4d4e2fe1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
sound/isa/sgalaxy.c
sound/isa/sgalaxy.c
+12
-9
No files found.
sound/isa/sgalaxy.c
View file @
0163a9e3
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/time.h>
#include <linux/time.h>
#include <linux/irq.h>
#include <sound/core.h>
#include <sound/core.h>
#include <sound/sb.h>
#include <sound/sb.h>
#include <sound/ad1848.h>
#include <sound/ad1848.h>
...
@@ -110,6 +111,10 @@ static int __init snd_sgalaxy_sbdsp_command(unsigned long port, unsigned char va
...
@@ -110,6 +111,10 @@ static int __init snd_sgalaxy_sbdsp_command(unsigned long port, unsigned char va
return
0
;
return
0
;
}
}
static
void
snd_sgalaxy_dummy_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
}
static
int
__init
snd_sgalaxy_setup_wss
(
unsigned
long
port
,
int
irq
,
int
dma
)
static
int
__init
snd_sgalaxy_setup_wss
(
unsigned
long
port
,
int
irq
,
int
dma
)
{
{
static
int
interrupt_bits
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
0x08
,
-
1
,
static
int
interrupt_bits
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
0x08
,
-
1
,
...
@@ -117,8 +122,6 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma)
...
@@ -117,8 +122,6 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma)
static
int
dma_bits
[]
=
{
1
,
2
,
0
,
3
};
static
int
dma_bits
[]
=
{
1
,
2
,
0
,
3
};
int
tmp
,
tmp1
;
int
tmp
,
tmp1
;
unsigned
long
flags
;
if
((
tmp
=
inb
(
port
+
3
))
==
0xff
)
if
((
tmp
=
inb
(
port
+
3
))
==
0xff
)
{
{
snd_printdd
(
"I/O address dead (0x%lx)
\n
"
,
port
);
snd_printdd
(
"I/O address dead (0x%lx)
\n
"
,
port
);
...
@@ -140,20 +143,20 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma)
...
@@ -140,20 +143,20 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma)
snd_printdd("sgalaxy - setting up IRQ/DMA for WSS\n");
snd_printdd("sgalaxy - setting up IRQ/DMA for WSS\n");
#endif
#endif
save_flags
(
flags
);
cli
();
/* initialize IRQ for WSS codec */
/* initialize IRQ for WSS codec */
tmp
=
interrupt_bits
[
irq
%
16
];
tmp
=
interrupt_bits
[
irq
%
16
];
if
(
tmp
<
0
)
{
if
(
tmp
<
0
)
restore_flags
(
flags
);
return
-
EINVAL
;
return
-
EINVAL
;
}
if
(
request_irq
(
irq
,
snd_sgalaxy_dummy_interrupt
,
SA_INTERRUPT
,
"sgalaxy"
,
NULL
))
return
-
EIO
;
outb
(
tmp
|
0x40
,
port
);
outb
(
tmp
|
0x40
,
port
);
tmp1
=
dma_bits
[
dma
%
4
];
tmp1
=
dma_bits
[
dma
%
4
];
outb
(
tmp
|
tmp1
,
port
);
outb
(
tmp
|
tmp1
,
port
);
restore_flags
(
flags
);
free_irq
(
irq
,
NULL
);
return
0
;
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