git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
sound
/
oss
/
gus_wave.c
diff --git
a/sound/oss/gus_wave.c
b/sound/oss/gus_wave.c
index
35ade6b
..
ed7333c
100644
(file)
--- a/
sound/oss/gus_wave.c
+++ b/
sound/oss/gus_wave.c
@@
-978,6
+978,13
@@
int __init gus_wave_detect(int baseaddr)
unsigned long loc;
unsigned char val;
unsigned long loc;
unsigned char val;
+ if (!request_region(baseaddr, 16, "GUS"))
+ return 0;
+ if (!request_region(baseaddr + 0x100, 12, "GUS")) { /* 0x10c-> is MAX */
+ release_region(baseaddr, 16);
+ return 0;
+ }
+
gus_base = baseaddr;
gus_write8(0x4c, 0); /* Reset GF1 */
gus_base = baseaddr;
gus_write8(0x4c, 0); /* Reset GF1 */
@@
-1015,8
+1022,11
@@
int __init gus_wave_detect(int baseaddr)
/* See if there is first block there.... */
gus_poke(0L, 0xaa);
/* See if there is first block there.... */
gus_poke(0L, 0xaa);
- if (gus_peek(0L) != 0xaa)
- return (0);
+ if (gus_peek(0L) != 0xaa) {
+ release_region(baseaddr + 0x100, 12);
+ release_region(baseaddr, 16);
+ return 0;
+ }
/* Now zero it out so that I can check for mirroring .. */
gus_poke(0L, 0x00);
/* Now zero it out so that I can check for mirroring .. */
gus_poke(0L, 0x00);