Sound Driver Fix for 2.1.60

John Gotts (jgotts@umich.edu)
Sun, 26 Oct 1997 01:26:35 -0400


2.1.60 broke the sound driver. Basically someone forgot to make the
appropriate pread/pwrite changes. Attached is the fix.

I didn't bother fixing dmasound.c because I have no way of testing my changes.

--- linux/drivers/sound/soundcard.c.orig Sun Oct 26 00:30:09 1997
+++ linux/drivers/sound/soundcard.c Sun Oct 26 01:19:19 1997
@@ -56,9 +56,10 @@



-static long
-sound_read (struct inode *inode, struct file *file, char *buf, unsigned long count)
+static ssize_t
+sound_read (struct file * file, char * buf, size_t count, loff_t *ppos)
{
+ struct inode *inode = file->f_dentry->d_inode;
int dev;

dev = MINOR (inode->i_rdev);
@@ -68,9 +69,10 @@
return sound_read_sw (dev, &files[dev], buf, count);
}

-static long
-sound_write (struct inode *inode, struct file *file, const char *buf, unsigned long count)
+static ssize_t
+sound_write (struct file * file, const char * buf, size_t count, loff_t *ppos)
{
+ struct inode *inode = file->f_dentry->d_inode;
int dev;

dev = MINOR (inode->i_rdev);

--
John GOTTS <jgotts@engin.umich.edu> http://www-personal.engin.umich.edu/~jgotts