patch-2.3.99-pre4 linux/drivers/sound/dev_table.c

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

diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/sound/dev_table.c linux/drivers/sound/dev_table.c
@@ -26,15 +26,13 @@
 	struct audio_operations *op;
 	int l, num;
 
-	if (vers != AUDIO_DRIVER_VERSION || driver_size > sizeof(struct audio_driver))
-	{
+	if (vers != AUDIO_DRIVER_VERSION || driver_size > sizeof(struct audio_driver)) {
 		printk(KERN_ERR "Sound: Incompatible audio driver for %s\n", name);
 		return -(EINVAL);
 	}
 	num = sound_alloc_audiodev();
 
-	if (num == -1)
-	{
+	if (num == -1) {
 		printk(KERN_ERR "sound: Too many audio drivers\n");
 		return -(EBUSY);
 	}
@@ -47,8 +45,7 @@
 
 	if (sound_nblocks < 1024)
 		sound_nblocks++;
-	if (d == NULL || op == NULL)
-	{
+	if (d == NULL || op == NULL) {
 		printk(KERN_ERR "Sound: Can't allocate driver for (%s)\n", name);
 		sound_unload_audiodev(num);
 		return -(ENOMEM);
@@ -91,14 +88,12 @@
 
 	int n = sound_alloc_mixerdev();
 
-	if (n == -1)
-	{
+	if (n == -1) {
 		printk(KERN_ERR "Sound: Too many mixer drivers\n");
 		return -EBUSY;
 	}
 	if (vers != MIXER_DRIVER_VERSION ||
-		driver_size > sizeof(struct mixer_operations))
-	{
+		driver_size > sizeof(struct mixer_operations)) {
 		printk(KERN_ERR "Sound: Incompatible mixer driver for %s\n", name);
 		return -EINVAL;
 	}
@@ -110,8 +105,7 @@
 
 	if (sound_nblocks < 1024)
 		sound_nblocks++;
-	if (op == NULL)
-	{
+	if (op == NULL) {
 		printk(KERN_ERR "Sound: Can't allocate mixer driver for (%s)\n", name);
 		return -ENOMEM;
 	}
@@ -131,8 +125,7 @@
 
 void sound_unload_audiodev(int dev)
 {
-	if (dev != -1)
-	{
+	if (dev != -1) {
 		DMAbuf_deinit(dev);
 		audio_devs[dev] = NULL;
 		unregister_sound_dsp((dev<<4)+3);
@@ -165,10 +158,8 @@
 {
 	int i;
 
-	for (i = 0; i < MAX_SYNTH_DEV; i++)
-	{
-		if (synth_devs[i] == NULL)
-		{
+	for (i = 0; i < MAX_SYNTH_DEV; i++) {
+		if (synth_devs[i] == NULL) {
 			if (i >= num_synths)
 				num_synths++;
 			return i;
@@ -192,10 +183,8 @@
 {
 	int i;
 
-	for (i = 0; i < MAX_TIMER_DEV; i++)
-	{
-		if (sound_timer_devs[i] == NULL)
-		{
+	for (i = 0; i < MAX_TIMER_DEV; i++) {
+		if (sound_timer_devs[i] == NULL) {
 			if (i >= num_sound_timers)
 				num_sound_timers++;
 			return i;
@@ -206,8 +195,7 @@
 
 void sound_unload_mixerdev(int dev)
 {
-	if (dev != -1)
-	{
+	if (dev != -1) {
 		mixer_devs[dev] = NULL;
 		unregister_sound_mixer(dev<<4);
 		num_mixers--;
@@ -216,8 +204,7 @@
 
 void sound_unload_mididev(int dev)
 {
-	if (dev != -1)
-	{
+	if (dev != -1) {
 		midi_devs[dev] = NULL;
 		unregister_sound_midi((dev<<4)+2);
 	}

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