sound driver patch for 2.1.61

Anders Hammarquist (iko@netg.se)
Sat, 1 Nov 1997 02:19:12 +0100 (MET)


Here's a quick patch to the sound driver to let it work with 2.1.61 (i.e.
making it dentry compatible).

Enjoy,
/Anders

-- Of course I'm crazy, but that doesn't mean I'm wrong.
Anders Hammarquist | Mud at Kingdoms | iko@netg.se
NetGuide Scandinavia | telnet kingdoms.se 1812 | Fax: +46 31 50 79 39
http://www.netg.se | | Tel: +46 31 50 79 40

--->8---
diff -u linux/drivers/sound/soundcard.c~ linux/drivers/sound/soundcard.c
--- linux/drivers/sound/soundcard.c~ Sun Sep 21 02:07:43 1997
+++ linux/drivers/sound/soundcard.c Sat Nov 1 01:51:50 1997
@@ -57,9 +57,10 @@


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

dev = MINOR (inode->i_rdev);

@@ -69,9 +70,10 @@
}

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

dev = MINOR (inode->i_rdev);

@@ -82,7 +84,7 @@

static long long sound_lseek (struct file *file, long long offset, int orig)
{
- return -EPERM;
+ return -ESPIPE;
}

static int
--->8---