patch-2.3.43 linux/drivers/sound/dmasound.c

Next file: linux/drivers/sound/es1370.c
Previous file: linux/drivers/sound/dev_table.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/drivers/sound/dmasound.c linux/drivers/sound/dmasound.c
@@ -4605,16 +4605,10 @@
 
 static struct file_operations mixer_fops =
 {
-	sound_lseek,
-	NULL,			/* mixer_read */
-	NULL,			/* mixer_write */
-	NULL,			/* mixer_readdir */
-	NULL,			/* mixer_poll */
-	mixer_ioctl,
-	NULL,			/* mixer_mmap */
-	mixer_open,
-	NULL,			/* flush */
-	mixer_release,
+	llseek:		sound_lseek,
+	ioctl:		mixer_ioctl,
+	open:		mixer_open,
+	release:	mixer_release,
 };
 
 
@@ -5231,20 +5225,14 @@
 
 static struct file_operations sq_fops =
 {
-	sound_lseek,
+	llseek:		sound_lseek,
+	write:		sq_write,
+	ioctl:		sq_ioctl,
+	open:		sq_open,
+	release:	sq_release,
 #ifdef CONFIG_PPC
-	sq_read,			/* sq_read */
-#else
-	NULL,			/* sq_read */
+	read:		sq_read,			/* sq_read */
 #endif
-	sq_write,
-	NULL,			/* sq_readdir */
-	NULL,			/* sq_poll */
-	sq_ioctl,
-	NULL,			/* sq_mmap */
-	sq_open,
-	NULL,			/* flush */
-	sq_release,
 };
 
 
@@ -5449,16 +5437,10 @@
 
 static struct file_operations state_fops =
 {
-	sound_lseek,
-	state_read,
-	NULL,			/* state_write */
-	NULL,			/* state_readdir */
-	NULL,			/* state_poll */
-	NULL,			/* state_ioctl */
-	NULL,			/* state_mmap */
-	state_open,
-	NULL,			/* flush */
-	state_release,
+	llseek:		sound_lseek,
+	read:		state_read,
+	open:		state_open,
+	release:	state_release,
 };
 
 
@@ -5700,10 +5682,12 @@
 }
 
 
-#define MAXARGS		8	/* Should be sufficient for now */
-
-void __init dmasound_setup(char *str, int *ints)
+static int __init dmasound_setup(char *str)
 {
+	int ints[6];
+
+	str = get_options(str, ARRAY_SIZE(ints), ints);
+
 	/* check the bootstrap parameter for "dmasound=" */
 
 	switch (ints[0]) {
@@ -5727,8 +5711,13 @@
 		break;
 	default:
 		printk("dmasound_setup: illegal number of arguments\n");
+		return 0;
 	}
+	
+	return 1;
 }
+
+__setup("dmasound=", dmasound_setup);
 
 
 #ifdef MODULE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)