diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 04:02:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 04:02:08 +0000 |
commit | fd095d09f2d475dc2e8599b1b8bae1cd65e91685 (patch) | |
tree | 217f87a997699505e0dd752931409b9f10fffe65 /drivers/sound | |
parent | c02e0599c4233f97071928f8118841954bacdadf (diff) |
Merge with 2.1.56 as first part of merging back my code.
Diffstat (limited to 'drivers/sound')
-rw-r--r-- | drivers/sound/dmasound.c | 22 | ||||
-rw-r--r-- | drivers/sound/soundcard.c | 9 |
2 files changed, 14 insertions, 17 deletions
diff --git a/drivers/sound/dmasound.c b/drivers/sound/dmasound.c index b7da7932a..1c37f9f5a 100644 --- a/drivers/sound/dmasound.c +++ b/drivers/sound/dmasound.c @@ -668,10 +668,9 @@ static long state_read(char *dest, unsigned long count); static int sound_open(struct inode *inode, struct file *file); -static int sound_fsync(struct inode *inode, struct file *filp); +static int sound_fsync(struct file *filp, struct dentry *dentry); static void sound_release(struct inode *inode, struct file *file); -static long long sound_lseek(struct inode *inode, struct file *file, - long long offset, int orig); +static long long sound_lseek(struct file *file, long long offset, int orig); static long sound_read(struct inode *inode, struct file *file, char *buf, unsigned long count); static long sound_write(struct inode *inode, struct file *file, @@ -3071,9 +3070,9 @@ static int sound_open(struct inode *inode, struct file *file) } -static int sound_fsync(struct inode *inode, struct file *filp) +static int sound_fsync(struct file *filp, struct dentry *dentry) { - int dev = MINOR(inode->i_rdev) & 0x0f; + int dev = MINOR(dentry->d_inode->i_rdev) & 0x0f; switch (dev) { case SND_DEV_STATUS: @@ -3116,8 +3115,7 @@ static void sound_release(struct inode *inode, struct file *file) } -static long long sound_lseek(struct inode *inode, struct file *file, - long long offset, int orig) +static long long sound_lseek(struct file *file, long long offset, int orig) { return -ESPIPE; } @@ -3186,25 +3184,25 @@ static int sound_ioctl(struct inode *inode, struct file *file, u_int cmd, return(0); case SNDCTL_DSP_POST: case SNDCTL_DSP_SYNC: - return(sound_fsync(inode, file)); + return(sound_fsync(file, file->f_dentry)); /* ++TeSche: before changing any of these it's probably wise to * wait until sound playing has settled down */ case SNDCTL_DSP_SPEED: - sound_fsync(inode, file); + sound_fsync(file, file->f_dentry); IOCTL_IN(arg, data); return(IOCTL_OUT(arg, sound_set_speed(data))); case SNDCTL_DSP_STEREO: - sound_fsync(inode, file); + sound_fsync(file, file->f_dentry); IOCTL_IN(arg, data); return(IOCTL_OUT(arg, sound_set_stereo(data))); case SOUND_PCM_WRITE_CHANNELS: - sound_fsync(inode, file); + sound_fsync(file, file->f_dentry); IOCTL_IN(arg, data); return(IOCTL_OUT(arg, sound_set_stereo(data-1)+1)); case SNDCTL_DSP_SETFMT: - sound_fsync(inode, file); + sound_fsync(file, file->f_dentry); IOCTL_IN(arg, data); return(IOCTL_OUT(arg, sound_set_format(data))); case SNDCTL_DSP_GETFMTS: diff --git a/drivers/sound/soundcard.c b/drivers/sound/soundcard.c index a9af5956b..450197a34 100644 --- a/drivers/sound/soundcard.c +++ b/drivers/sound/soundcard.c @@ -80,8 +80,7 @@ sound_write (struct inode *inode, struct file *file, const char *buf, unsigned l return sound_write_sw (dev, &files[dev], buf, count); } -static long long -sound_lseek (struct inode *inode, struct file *file, long long offset, int orig) +static long long sound_lseek (struct file *file, long long offset, int orig) { return -EPERM; } @@ -139,8 +138,8 @@ sound_release (struct inode *inode, struct file *file) sound_release_sw (dev, &files[dev]); #ifdef MODULE MOD_DEC_USE_COUNT; - return 0; #endif + return 0; } static int @@ -256,13 +255,13 @@ sound_poll (struct file *file, poll_table * wait) } static int -sound_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma) +sound_mmap (struct file *file, struct vm_area_struct *vma) { int dev, dev_class; unsigned long size; struct dma_buffparms *dmap = NULL; - dev = MINOR (inode->i_rdev); + dev = MINOR (file->f_dentry->d_inode->i_rdev); files[dev].flags = file->f_flags; |