patch-1.3.36 linux/drivers/sound/midibuf.c

Next file: linux/drivers/sound/mpu401.c
Previous file: linux/drivers/sound/midi_synth.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.35/linux/drivers/sound/midibuf.c linux/drivers/sound/midibuf.c
@@ -246,14 +246,7 @@
     input_sleep_flag[dev].mode = WK_NONE;
   };
 
-  midi_in_buf[dev] = (struct midi_buf *) (
-					   {
-					   caddr_t x;
-			 x = kmalloc (sizeof (struct midi_buf), GFP_KERNEL);
-
-					   x;
-					   }
-  );
+  midi_in_buf[dev] = (struct midi_buf *) kmalloc (sizeof (struct midi_buf), GFP_KERNEL);
 
   if (midi_in_buf[dev] == NULL)
     {
@@ -264,14 +257,7 @@
     }
   midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0;
 
-  midi_out_buf[dev] = (struct midi_buf *) (
-					    {
-					    caddr_t x;
-			 x = kmalloc (sizeof (struct midi_buf), GFP_KERNEL);
-
-					    x;
-					    }
-  );
+  midi_out_buf[dev] = (struct midi_buf *) kmalloc (sizeof (struct midi_buf), GFP_KERNEL);
 
   if (midi_out_buf[dev] == NULL)
     {
@@ -417,7 +403,7 @@
 
       for (i = 0; i < n; i++)
 	{
-	  memcpy_fromfs ((&tmp_data), &((buf)[c]), (1));
+	  memcpy_fromfs (&tmp_data, &((buf)[c]), 1);
 	  QUEUE_BYTE (midi_out_buf[dev], tmp_data);
 	  c++;
 	}
@@ -482,7 +468,7 @@
       while (c < n)
 	{
 	  REMOVE_BYTE (midi_in_buf[dev], tmp_data);
-	  memcpy_tofs (&((buf)[c]), (&tmp_data), (1));
+	  memcpy_tofs (&((buf)[c]), &tmp_data, 1);
 	  c++;
 	}
     }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this