staging: line6: drop midi_postprocess flag
authorStefan Hajnoczi <stefanha@gmail.com>
Thu, 22 Nov 2012 19:49:05 +0000 (20:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2012 00:13:48 +0000 (16:13 -0800)
It is no longer necessary to trigger on MIDI transmit messages that will
change the state of the device since:

1. We've dropped the midi_postprocess sysfs attr in a previous commit so
   it is not possible to activate this feature anymore.

2. The other sysfs attrs that could inspect the state after a dump
   request have been dropped.

Therefore we can safely remove this dead code.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/line6/midi.c
drivers/staging/line6/pod.c
drivers/staging/line6/pod.h

index 6d9ecb9d7437615de893b70611b2d0b02a59657a..6982eca661bd715f4a26a08007ac0a07e9dfec91 100644 (file)
@@ -148,28 +148,6 @@ static int send_midi_async(struct usb_line6 *line6, unsigned char *data,
        }
 
        ++line6->line6midi->num_active_send_urbs;
-
-       switch (line6->usbdev->descriptor.idProduct) {
-       case LINE6_DEVID_BASSPODXT:
-       case LINE6_DEVID_BASSPODXTLIVE:
-       case LINE6_DEVID_BASSPODXTPRO:
-       case LINE6_DEVID_PODXT:
-       case LINE6_DEVID_PODXTLIVE:
-       case LINE6_DEVID_PODXTPRO:
-       case LINE6_DEVID_POCKETPOD:
-               line6_pod_midi_postprocess((struct usb_line6_pod *)line6, data,
-                                          length);
-               break;
-
-       case LINE6_DEVID_VARIAX:
-       case LINE6_DEVID_PODHD300:
-       case LINE6_DEVID_PODHD500:
-               break;
-
-       default:
-               MISSING_CASE;
-       }
-
        return 0;
 }
 
index 37b20d72672aac3b33344187d22cad42f6de2a28..ddd0e54b85486356fea501dd695a6236b0372eba 100644 (file)
@@ -284,40 +284,6 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
        }
 }
 
-/*
-       Detect some cases that require a channel dump after sending a command to the
-       device. Important notes:
-       *) The actual dump request can not be sent here since we are not allowed to
-       wait for the completion of the first message in this context, and sending
-       the dump request before completion of the previous message leaves the POD
-       in an undefined state. The dump request will be sent when the echoed
-       commands are received.
-       *) This method fails if a param change message is "chopped" after the first
-       byte.
-*/
-void line6_pod_midi_postprocess(struct usb_line6_pod *pod, unsigned char *data,
-                               int length)
-{
-       int i;
-
-       if (!pod->midi_postprocess)
-               return;
-
-       for (i = 0; i < length; ++i) {
-               if (data[i] == (LINE6_PROGRAM_CHANGE | LINE6_CHANNEL_HOST)) {
-                       line6_invalidate_current(&pod->dumpreq);
-                       break;
-               } else
-                   if ((data[i] == (LINE6_PARAM_CHANGE | LINE6_CHANNEL_HOST))
-                       && (i < length - 1))
-                       if ((data[i + 1] == POD_amp_model_setup)
-                           || (data[i + 1] == POD_effect_setup)) {
-                               line6_invalidate_current(&pod->dumpreq);
-                               break;
-                       }
-       }
-}
-
 /*
        Transmit PODxt Pro control parameter.
 */
index 481cce6c234ceb6e355a84940a57025f0d62025a..8543baeec0ea2c7d42c101073fc174f2b0e90272 100644 (file)
@@ -127,18 +127,11 @@ struct usb_line6_pod {
                Device ID.
        */
        int device_id;
-
-       /**
-               Flag to enable MIDI postprocessing.
-       */
-       char midi_postprocess;
 };
 
 extern void line6_pod_disconnect(struct usb_interface *interface);
 extern int line6_pod_init(struct usb_interface *interface,
                          struct usb_line6_pod *pod);
-extern void line6_pod_midi_postprocess(struct usb_line6_pod *pod,
-                                      unsigned char *data, int length);
 extern void line6_pod_process_message(struct usb_line6_pod *pod);
 extern void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
                                         u8 value);