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
15377d7c
Commit
15377d7c
authored
Mar 21, 2003
by
Alan Cox
Committed by
Linus Torvalds
Mar 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix up opti92x-ad1848
parent
9b88b133
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
sound/isa/opti9xx/opti92x-ad1848.c
sound/isa/opti9xx/opti92x-ad1848.c
+18
-14
No files found.
sound/isa/opti9xx/opti92x-ad1848.c
View file @
15377d7c
...
...
@@ -326,11 +326,11 @@ static char * snd_opti9xx_names[] = {
static
long
snd_legacy_find_free_ioport
(
long
*
port_table
,
long
size
)
{
while
(
*
port_table
!=
-
1
)
{
if
(
!
check_region
(
*
port_table
,
size
))
if
(
request_region
(
*
port_table
,
size
,
"opti92x-ad1848"
))
return
*
port_table
;
port_table
++
;
}
return
-
1
;
return
SNDRV_AUTO_PORT
;
}
static
int
__init
snd_opti9xx_init
(
opti9xx_t
*
chip
,
unsigned
short
hardware
)
...
...
@@ -1917,6 +1917,10 @@ static void snd_card_opti9xx_free(snd_card_t *card)
#ifdef __ISAPNP__
snd_card_opti9xx_deactivate
(
chip
);
#endif
/* __ISAPNP__ */
if
(
chip
->
wss_base
!=
SNDRV_AUTO_PORT
)
release_region
(
chip
->
wss_base
,
4
);
if
(
chip
->
mpu_port
!=
SNDRV_AUTO_PORT
)
release_region
(
chip
->
mpu_port
,
2
);
if
(
chip
->
res_mc_base
)
{
release_resource
(
chip
->
res_mc_base
);
kfree_nocheck
(
chip
->
res_mc_base
);
...
...
@@ -1962,6 +1966,16 @@ static int __init snd_card_opti9xx_probe(void)
card
->
private_free
=
snd_card_opti9xx_free
;
chip
=
(
opti9xx_t
*
)
card
->
private_data
;
chip
->
wss_base
=
port
;
chip
->
fm_port
=
fm_port
;
chip
->
mpu_port
=
mpu_port
;
chip
->
irq
=
irq
;
chip
->
mpu_irq
=
mpu_irq
;
chip
->
dma1
=
dma1
;
#if defined(CS4231) || defined(OPTi93X)
chip
->
dma2
=
dma2
;
#endif
#ifdef __ISAPNP__
if
(
isapnp
&&
(
hw
=
snd_card_opti9xx_isapnp
(
chip
))
>
0
)
{
switch
(
hw
)
{
...
...
@@ -2000,28 +2014,18 @@ static int __init snd_card_opti9xx_probe(void)
return
-
ENOMEM
;
}
chip
->
wss_base
=
port
;
chip
->
fm_port
=
fm_port
;
chip
->
mpu_port
=
mpu_port
;
chip
->
irq
=
irq
;
chip
->
mpu_irq
=
mpu_irq
;
chip
->
dma1
=
dma1
;
#if defined(CS4231) || defined(OPTi93X)
chip
->
dma2
=
dma2
;
#endif
#ifdef __ISAPNP__
if
(
!
isapnp
)
{
#endif
if
(
chip
->
wss_base
==
SNDRV_AUTO_PORT
)
{
if
((
chip
->
wss_base
=
snd_legacy_find_free_ioport
(
possible_ports
,
4
))
<
0
)
{
if
((
chip
->
wss_base
=
snd_legacy_find_free_ioport
(
possible_ports
,
4
))
==
SNDRV_AUTO_PORT
)
{
snd_card_free
(
card
);
snd_printk
(
"unable to find a free WSS port
\n
"
);
return
-
EBUSY
;
}
}
if
(
chip
->
mpu_port
==
SNDRV_AUTO_PORT
)
{
if
((
chip
->
mpu_port
=
snd_legacy_find_free_ioport
(
possible_mpu_ports
,
2
))
<
0
)
{
if
((
chip
->
mpu_port
=
snd_legacy_find_free_ioport
(
possible_mpu_ports
,
2
))
==
SNDRV_AUTO_PORT
)
{
snd_card_free
(
card
);
snd_printk
(
"unable to find a free MPU401 port
\n
"
);
return
-
EBUSY
;
...
...
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