summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/snd
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-12 19:01:30 +0000
committerpeter <peter@FreeBSD.org>1999-05-12 19:01:30 +0000
commitc49cd856cf661e4ceb632a51e0ac95a061722c24 (patch)
treeb354c8181ac1cf49f08f1255bdaab1a9b8adcca1 /sys/i386/isa/snd
parentac97e7ad368b1410573c3aa1a55e6756b535c997 (diff)
downloadFreeBSD-src-c49cd856cf661e4ceb632a51e0ac95a061722c24.zip
FreeBSD-src-c49cd856cf661e4ceb632a51e0ac95a061722c24.tar.gz
Fix dev_t/minor problems
Diffstat (limited to 'sys/i386/isa/snd')
-rw-r--r--sys/i386/isa/snd/ad1848.c20
-rw-r--r--sys/i386/isa/snd/sb_dsp.c15
-rw-r--r--sys/i386/isa/snd/sound.c19
3 files changed, 31 insertions, 23 deletions
diff --git a/sys/i386/isa/snd/ad1848.c b/sys/i386/isa/snd/ad1848.c
index 8b05fa8..9d0a0cf 100644
--- a/sys/i386/isa/snd/ad1848.c
+++ b/sys/i386/isa/snd/ad1848.c
@@ -323,13 +323,14 @@ mss_attach(struct isa_device *dev)
}
int
-mss_open(dev_t dev, int flags, int mode, struct proc * p)
+mss_open(dev_t i_dev, int flags, int mode, struct proc * p)
{
int unit;
+ int dev;
snddev_info *d;
u_long s;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
dev &= 0xf ;
d = &pcm_info[unit] ;
@@ -395,13 +396,14 @@ mss_open(dev_t dev, int flags, int mode, struct proc * p)
}
static int
-mss_close(dev_t dev, int flags, int mode, struct proc * p)
+mss_close(dev_t i_dev, int flags, int mode, struct proc * p)
{
int unit;
+ int dev;
snddev_info *d;
u_long s;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
dev &= 0xf;
d = &pcm_info[unit] ;
@@ -437,12 +439,13 @@ mss_close(dev_t dev, int flags, int mode, struct proc * p)
}
static int
-mss_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
+mss_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
{
snddev_info *d;
int unit;
+ int dev;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
d = &pcm_info[unit] ;
/*
@@ -1897,12 +1900,13 @@ gus_mem_cfg(snddev_info *d)
#endif /* gus mem cfg... */
static int
-ad1816_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
+ad1816_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
{
snddev_info *d;
int unit;
+ int dev;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4;
d = &pcm_info[unit];
diff --git a/sys/i386/isa/snd/sb_dsp.c b/sys/i386/isa/snd/sb_dsp.c
index 3c77f1f..9e453a2 100644
--- a/sys/i386/isa/snd/sb_dsp.c
+++ b/sys/i386/isa/snd/sb_dsp.c
@@ -160,12 +160,13 @@ sb_attach(struct isa_device *dev)
*
*/
static int
-sb_dsp_open(dev_t dev, int flags, int mode, struct proc * p)
+sb_dsp_open(dev_t i_dev, int flags, int mode, struct proc * p)
{
snddev_info *d;
int unit ;
+ int dev;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
d = &pcm_info[unit] ;
@@ -235,13 +236,14 @@ sb_dsp_open(dev_t dev, int flags, int mode, struct proc * p)
}
static int
-sb_dsp_close(dev_t dev, int flags, int mode, struct proc * p)
+sb_dsp_close(dev_t i_dev, int flags, int mode, struct proc * p)
{
int unit;
+ int dev;
snddev_info *d;
u_long s;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
d = &pcm_info[unit] ;
@@ -257,12 +259,13 @@ sb_dsp_close(dev_t dev, int flags, int mode, struct proc * p)
}
static int
-sb_dsp_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
+sb_dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
{
int unit;
+ int dev;
snddev_info *d;
- dev = minor(dev);
+ dev = minor(i_dev);
unit = dev >> 4 ;
d = &pcm_info[unit] ;
diff --git a/sys/i386/isa/snd/sound.c b/sys/i386/isa/snd/sound.c
index 267901e..7b4e1bb 100644
--- a/sys/i386/isa/snd/sound.c
+++ b/sys/i386/isa/snd/sound.c
@@ -445,12 +445,13 @@ generic_snd_probe(struct isa_device * dev, snddev_info **p[], char *s)
* number.
*/
static snddev_info *
-get_snddev_info(dev_t dev, int *unit)
+get_snddev_info(dev_t i_dev, int *unit)
{
int u;
snddev_info *d = NULL ;
+ int dev;
- dev = minor(dev);
+ dev = minor(i_dev);
u = dev >> 4 ;
if (unit)
*unit = u ;
@@ -502,7 +503,7 @@ sndopen(dev_t i_dev, int flags, int mode, struct proc * p)
snddev_info *d;
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
DEB(printf("open snd%d subdev %d flags 0x%08x mode 0x%08x\n",
unit, dev & 0xf, flags, mode));
@@ -545,7 +546,7 @@ sndclose(dev_t i_dev, int flags, int mode, struct proc * p)
snddev_info *d;
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
DEB(printf("close snd%d subdev %d\n", unit, dev & 0xf));
@@ -579,7 +580,7 @@ sndread(dev_t i_dev, struct uio * buf, int flag)
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
DEB(printf("read snd%d subdev %d flag 0x%08x\n", unit, dev & 0xf, flag));
if (d == NULL)
@@ -666,7 +667,7 @@ sndwrite(dev_t i_dev, struct uio * buf, int flag)
u_long s;
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
DEB(printf("write snd%d subdev %d flag 0x%08x\n", unit, dev & 0xf, flag));
@@ -752,7 +753,7 @@ sndioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
u_long s;
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
if (d == NULL)
return (ENXIO) ;
@@ -767,7 +768,7 @@ sndioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc * p)
return ENXIO ;
}
if (d->ioctl)
- ret = d->ioctl(dev, cmd, arg, mode, p);
+ ret = d->ioctl(i_dev, cmd, arg, mode, p);
if (ret != ENOSYS)
return ret ;
@@ -1189,7 +1190,7 @@ sndselect(dev_t i_dev, int rw, struct proc * p)
u_long flags;
dev = minor(i_dev);
- d = get_snddev_info(dev, &unit);
+ d = get_snddev_info(i_dev, &unit);
DEB(printf("sndselect dev 0x%04x rw 0x%08x\n",i_dev, rw));
if (d == NULL ) /* should not happen! */
return (ENXIO) ;
OpenPOWER on IntegriCloud