summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r--sys/i386/isa/sound/gus_card.c4
-rw-r--r--sys/i386/isa/sound/mpu401.c2
-rw-r--r--sys/i386/isa/sound/os.h19
-rw-r--r--sys/i386/isa/sound/pas2_card.c1
-rw-r--r--sys/i386/isa/sound/sb_dsp.c2
-rw-r--r--sys/i386/isa/sound/soundcard.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/sys/i386/isa/sound/gus_card.c b/sys/i386/isa/sound/gus_card.c
index 751b74f..414034d 100644
--- a/sys/i386/isa/sound/gus_card.c
+++ b/sys/i386/isa/sound/gus_card.c
@@ -40,7 +40,7 @@ int gus_base, gus_irq, gus_dma;
static int
set_gus_irq (int interrupt_level)
{
- int retcode;
+ int retcode = EINVAL;
#ifdef linux
struct sigaction sa;
@@ -72,7 +72,7 @@ set_gus_irq (int interrupt_level)
int
gus_set_midi_irq (int interrupt_level)
{
- int retcode;
+ int retcode = EINVAL;
#ifdef linux
struct sigaction sa;
diff --git a/sys/i386/isa/sound/mpu401.c b/sys/i386/isa/sound/mpu401.c
index 9dd5cb2..e8c011b 100644
--- a/sys/i386/isa/sound/mpu401.c
+++ b/sys/i386/isa/sound/mpu401.c
@@ -130,7 +130,7 @@ poll_mpu401 (unsigned long dummy)
static int
set_mpu401_irq (int interrupt_level)
{
- int retcode;
+ int retcode = EINVAL;
#ifdef linux
struct sigaction sa;
diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h
index 3e3aced..4037a03 100644
--- a/sys/i386/isa/sound/os.h
+++ b/sys/i386/isa/sound/os.h
@@ -44,6 +44,7 @@
#include "param.h"
#include "systm.h"
+#include "kernel.h"
#include "ioctl.h"
#include "tty.h"
#include "proc.h"
@@ -51,7 +52,6 @@
#include "conf.h"
#include "file.h"
#include "uio.h"
-/* #include "kernel.h" */
#include "syslog.h"
#include "errno.h"
#include "malloc.h"
@@ -119,14 +119,14 @@ typedef struct uio snd_rw_buf;
* user space. The count is number of bytes to be moved.
*/
#define COPY_FROM_USER(target, source, offs, count) \
- if (uiomove(target, count, source)) { \
+ do { if (uiomove(target, count, source)) { \
printf ("sb: Bad copyin()!\n"); \
- } else
+ } } while(0)
/* Like COPY_FOM_USER but for writes. */
#define COPY_TO_USER(target, offs, source, count) \
- if (uiomove(source, count, target)) { \
+ do { if (uiomove(source, count, target)) { \
printf ("sb: Bad copyout()!\n"); \
- } else
+ } } while(0)
/*
* The following macros are like COPY_*_USER but work just with one byte (8bit),
* short (16 bit) or long (32 bit) at a time.
@@ -207,7 +207,7 @@ typedef struct uio snd_rw_buf;
#define INTERRUPTIBLE_SLEEP_ON(on_what, flag) \
{ \
flag = 1; \
- flag=tsleep(&(on_what), (PRIBIO-5)|PCATCH, "sndint", __timeout_val); \
+ flag=tsleep((caddr_t)&(on_what), (PRIBIO-5)|PCATCH, "sndint", __timeout_val); \
if(flag == ERESTART) __process_aborting = 1;\
else __process_aborting = 0;\
__timeout_val = 0; \
@@ -215,7 +215,7 @@ typedef struct uio snd_rw_buf;
}
/* An the following wakes up a process */
-#define WAKE_UP(who) wakeup(&(who))
+#define WAKE_UP(who) wakeup((caddr_t)&(who))
/*
* Timing macros. This driver assumes that there is a timer running in the
@@ -224,7 +224,6 @@ typedef struct uio snd_rw_buf;
*/
#ifndef HZ
-extern int hz;
#define HZ hz
#endif
@@ -286,8 +285,8 @@ extern int hz;
* The rest of this file is not complete yet. The functions using these
* macros will not work
*/
-#define ALLOC_DMA_CHN(chn) (0)
-#define RELEASE_DMA_CHN(chn) (0)
+#define ALLOC_DMA_CHN(chn) ({ 0; })
+#define RELEASE_DMA_CHN(chn) ({ 0; })
#define DMA_MODE_READ 0
#define DMA_MODE_WRITE 1
#define RELEASE_IRQ(irq_no)
diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c
index e5a2f1f..96fe651 100644
--- a/sys/i386/isa/sound/pas2_card.c
+++ b/sys/i386/isa/sound/pas2_card.c
@@ -129,6 +129,7 @@ set_pas_irq (int interrupt_level)
return retcode;
#else
/* # error This routine does not work with this OS */
+ return EINVAL;
#endif
}
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index 3802d88..efe5bef 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -224,7 +224,7 @@ sbintr (int unused)
static int
set_dsp_irq (int interrupt_level)
{
- int retcode;
+ int retcode = EINVAL;
#ifdef linux
struct sigaction sa;
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index 4988e06..1089e87 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -491,7 +491,7 @@ request_sound_timer (int count)
int tmp = count;
if (count < 0)
- timeout (sequencer_timer, 0, -count);
+ timeout ((timeout_func_t)sequencer_timer, 0, -count);
else
{
@@ -505,7 +505,7 @@ request_sound_timer (int count)
if (!count)
count = 1;
- timeout (sequencer_timer, 0, count);
+ timeout ((timeout_func_t)sequencer_timer, 0, count);
}
timer_running = 1;
}
OpenPOWER on IntegriCloud