public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: devel@driverdev.osuosl.org
Cc: Markus Grabner <grabner@icg.tugraz.at>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	line6linux-devel@lists.sourceforge.net,
	<linux-kernel@vger.kernel.org>,
	laurent_navet@yahoo.com, Stefan Hajnoczi <stefanha@gmail.com>
Subject: [PATCH 26/46] staging: line6: drop midi_postprocess flag
Date: Thu, 22 Nov 2012 20:49:05 +0100	[thread overview]
Message-ID: <1353613765-18690-27-git-send-email-stefanha@gmail.com> (raw)
In-Reply-To: <1353613765-18690-1-git-send-email-stefanha@gmail.com>

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>
---
 drivers/staging/line6/midi.c | 22 ----------------------
 drivers/staging/line6/pod.c  | 34 ----------------------------------
 drivers/staging/line6/pod.h  |  7 -------
 3 files changed, 63 deletions(-)

diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c
index 8261875..53bef97 100644
--- a/drivers/staging/line6/midi.c
+++ b/drivers/staging/line6/midi.c
@@ -154,28 +154,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;
 }
 
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 37b20d7..ddd0e54 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -285,40 +285,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.
 */
 void line6_pod_transmit_parameter(struct usb_line6_pod *pod, int param,
diff --git a/drivers/staging/line6/pod.h b/drivers/staging/line6/pod.h
index 481cce6..8543bae 100644
--- a/drivers/staging/line6/pod.h
+++ b/drivers/staging/line6/pod.h
@@ -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);
-- 
1.8.0


  parent reply	other threads:[~2012-11-22 19:51 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 19:48 [PATCH 00/46] staging: line6: drop MIDI state sysfs attrs Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 01/46] staging: line6: drop channel sysfs attr Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 02/46] staging: line6: drop clip " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 03/46] staging: line6: drop unused param_dirty bitmap Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 04/46] staging: line6: drop dirty sysfs attr Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 05/46] staging: line6: drop dump " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 06/46] staging: line6: drop dump_buf " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 07/46] staging: line6: drop monitor_level " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 08/46] staging: line6: change monitor_level type ValueWait -> int Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 09/46] staging: line6: drop name sysfs attr Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 10/46] staging: line6: drop name_buf " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 11/46] staging: line6: drop retrieve_amp_setup " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 12/46] staging: line6: drop retrieve_channel " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 13/46] staging: line6: drop retrieve_effects_setup " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 14/46] staging: line6: drop store_amp_setup " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 15/46] staging: line6: drop store_channel " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 16/46] staging: line6: drop store_effects_setup " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 17/46] staging: line6: drop routing " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 18/46] staging: line6: drop tuner_freq " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 19/46] staging: line6: drop tuner_note " Stefan Hajnoczi
2012-11-22 19:48 ` [PATCH 20/46] staging: line6: drop tuner_mute " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 21/46] staging: line6: drop tuner_pitch " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 22/46] staging: line6: drop finish " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 23/46] staging: line6: drop midi_postprocess " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 24/46] staging: line6: drop midi_mask_receive Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 25/46] staging: line6: drop midi_mask_transmit Stefan Hajnoczi
2012-11-22 19:49 ` Stefan Hajnoczi [this message]
2012-11-22 19:49 ` [PATCH 27/46] staging: line6: drop pod.c raw sysfs attr Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 28/46] staging: line6: drop tuner param filtering Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 29/46] staging: line6: drop variax model sysfs attr Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 30/46] staging: line6: drop variax volume " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 31/46] staging: line6: drop variax tone " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 32/46] staging: line6: drop variax name " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 33/46] staging: line6: drop variax bank " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 34/46] staging: line6: drop variax dump " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 35/46] staging: line6: drop variax active " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 36/46] staging: line6: drop variax guitar " Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 37/46] staging: line6: drop variax raw sysfs attrs Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 38/46] staging: line6: drop CONFIG_LINE6_USB_RAW Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 39/46] staging: line6: drop amp/effects dump request triggers Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 40/46] staging: line6: drop MIDI parameter sysfs attrs Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 41/46] staging: line6: drop pod prog_data buffers Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 42/46] staging: line6: drop unused pod atomic_flags field Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 43/46] staging: line6: drop variax model_data field Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 44/46] staging: line6: drop dump requests from variax startup Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 45/46] staging: line6: drop dump requests from pod startup Stefan Hajnoczi
2012-11-22 19:49 ` [PATCH 46/46] staging: line6: drop unused dumprequest code Stefan Hajnoczi
2012-11-22 19:58 ` [PATCH 00/46] staging: line6: drop MIDI state sysfs attrs Greg Kroah-Hartman
2012-11-22 20:08   ` Stefan Hajnoczi
2012-11-24  0:13     ` Markus Grabner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353613765-18690-27-git-send-email-stefanha@gmail.com \
    --to=stefanha@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=grabner@icg.tugraz.at \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent_navet@yahoo.com \
    --cc=line6linux-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox