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 46/46] staging: line6: drop unused dumprequest code
Date: Thu, 22 Nov 2012 20:49:25 +0100	[thread overview]
Message-ID: <1353613765-18690-47-git-send-email-stefanha@gmail.com> (raw)
In-Reply-To: <1353613765-18690-1-git-send-email-stefanha@gmail.com>

The line6 drive no longer requests MIDI dumps from the device so
dumprequest.c is not needed.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
---
 drivers/staging/line6/Makefile      |   1 -
 drivers/staging/line6/dumprequest.c | 135 ------------------------------------
 drivers/staging/line6/dumprequest.h |  76 --------------------
 3 files changed, 212 deletions(-)
 delete mode 100644 drivers/staging/line6/dumprequest.c
 delete mode 100644 drivers/staging/line6/dumprequest.h

diff --git a/drivers/staging/line6/Makefile b/drivers/staging/line6/Makefile
index 44ee5ae..ae5c374 100644
--- a/drivers/staging/line6/Makefile
+++ b/drivers/staging/line6/Makefile
@@ -4,7 +4,6 @@ line6usb-y := 		\
 		audio.o		\
 		capture.o	\
 		driver.o	\
-		dumprequest.o	\
 		midi.o		\
 		midibuf.o	\
 		pcm.o		\
diff --git a/drivers/staging/line6/dumprequest.c b/drivers/staging/line6/dumprequest.c
deleted file mode 100644
index 60c7bae..0000000
--- a/drivers/staging/line6/dumprequest.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Line6 Linux USB driver - 0.9.1beta
- *
- * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
- *
- *	This program is free software; you can redistribute it and/or
- *	modify it under the terms of the GNU General Public License as
- *	published by the Free Software Foundation, version 2.
- *
- */
-
-#include <linux/slab.h>
-
-#include "driver.h"
-#include "dumprequest.h"
-
-/*
-	Set "dump in progress" flag.
-*/
-void line6_dump_started(struct line6_dump_request *l6dr, int dest)
-{
-	l6dr->in_progress = dest;
-}
-
-/*
-	Invalidate current channel, i.e., set "dump in progress" flag.
-	Reading from the "dump" special file blocks until dump is completed.
-*/
-void line6_invalidate_current(struct line6_dump_request *l6dr)
-{
-	line6_dump_started(l6dr, LINE6_DUMP_CURRENT);
-}
-
-/*
-	Clear "dump in progress" flag and notify waiting processes.
-*/
-void line6_dump_finished(struct line6_dump_request *l6dr)
-{
-	l6dr->in_progress = LINE6_DUMP_NONE;
-	wake_up(&l6dr->wait);
-}
-
-/*
-	Send an asynchronous channel dump request.
-*/
-int line6_dump_request_async(struct line6_dump_request *l6dr,
-			     struct usb_line6 *line6, int num, int dest)
-{
-	int ret;
-	line6_dump_started(l6dr, dest);
-	ret = line6_send_raw_message_async(line6, l6dr->reqbufs[num].buffer,
-					   l6dr->reqbufs[num].length);
-
-	if (ret < 0)
-		line6_dump_finished(l6dr);
-
-	return ret;
-}
-
-/*
-	Wait for completion (interruptible).
-*/
-int line6_dump_wait_interruptible(struct line6_dump_request *l6dr)
-{
-	return wait_event_interruptible(l6dr->wait,
-					l6dr->in_progress == LINE6_DUMP_NONE);
-}
-
-/*
-	Wait for completion.
-*/
-void line6_dump_wait(struct line6_dump_request *l6dr)
-{
-	wait_event(l6dr->wait, l6dr->in_progress == LINE6_DUMP_NONE);
-}
-
-/*
-	Wait for completion (with timeout).
-*/
-int line6_dump_wait_timeout(struct line6_dump_request *l6dr, long timeout)
-{
-	return wait_event_timeout(l6dr->wait,
-				  l6dr->in_progress == LINE6_DUMP_NONE,
-				  timeout);
-}
-
-/*
-	Initialize dump request buffer.
-*/
-int line6_dumpreq_initbuf(struct line6_dump_request *l6dr, const void *buf,
-			  size_t len, int num)
-{
-	l6dr->reqbufs[num].buffer = kmemdup(buf, len, GFP_KERNEL);
-	if (l6dr->reqbufs[num].buffer == NULL)
-		return -ENOMEM;
-	l6dr->reqbufs[num].length = len;
-	return 0;
-}
-
-/*
-	Initialize dump request data structure (including one buffer).
-*/
-int line6_dumpreq_init(struct line6_dump_request *l6dr, const void *buf,
-		       size_t len)
-{
-	int ret;
-	ret = line6_dumpreq_initbuf(l6dr, buf, len, 0);
-	if (ret < 0)
-		return ret;
-	init_waitqueue_head(&l6dr->wait);
-	return 0;
-}
-
-/*
-	Destruct dump request data structure.
-*/
-void line6_dumpreq_destructbuf(struct line6_dump_request *l6dr, int num)
-{
-	if (l6dr == NULL)
-		return;
-	if (l6dr->reqbufs[num].buffer == NULL)
-		return;
-	kfree(l6dr->reqbufs[num].buffer);
-	l6dr->reqbufs[num].buffer = NULL;
-}
-
-/*
-	Destruct dump request data structure.
-*/
-void line6_dumpreq_destruct(struct line6_dump_request *l6dr)
-{
-	if (l6dr->reqbufs[0].buffer == NULL)
-		return;
-	line6_dumpreq_destructbuf(l6dr, 0);
-}
diff --git a/drivers/staging/line6/dumprequest.h b/drivers/staging/line6/dumprequest.h
deleted file mode 100644
index c17a262..0000000
--- a/drivers/staging/line6/dumprequest.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Line6 Linux USB driver - 0.9.1beta
- *
- * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
- *
- *	This program is free software; you can redistribute it and/or
- *	modify it under the terms of the GNU General Public License as
- *	published by the Free Software Foundation, version 2.
- *
- */
-
-#ifndef DUMPREQUEST_H
-#define DUMPREQUEST_H
-
-#include <linux/usb.h>
-#include <linux/wait.h>
-#include <sound/core.h>
-
-enum {
-	LINE6_DUMP_NONE,
-	LINE6_DUMP_CURRENT
-};
-
-struct line6_dump_reqbuf {
-	/**
-		 Buffer for dump requests.
-	*/
-	unsigned char *buffer;
-
-	/**
-		 Size of dump request.
-	*/
-	size_t length;
-};
-
-/**
-	 Provides the functionality to request channel/model/... dump data from a
-	 Line6 device.
-*/
-struct line6_dump_request {
-	/**
-		 Wait queue for access to program dump data.
-	*/
-	wait_queue_head_t wait;
-
-	/**
-		 Indicates an unfinished program dump request.
-		 0: no dump
-		 1: dump current settings
-		 Other device-specific values are also allowed.
-	*/
-	int in_progress;
-
-	/**
-		 Dump request buffers
-	*/
-	struct line6_dump_reqbuf reqbufs[1];
-};
-
-extern void line6_dump_finished(struct line6_dump_request *l6dr);
-extern int line6_dump_request_async(struct line6_dump_request *l6dr,
-				    struct usb_line6 *line6, int num, int dest);
-extern void line6_dump_started(struct line6_dump_request *l6dr, int dest);
-extern void line6_dumpreq_destruct(struct line6_dump_request *l6dr);
-extern void line6_dumpreq_destructbuf(struct line6_dump_request *l6dr, int num);
-extern int line6_dumpreq_init(struct line6_dump_request *l6dr, const void *buf,
-			      size_t len);
-extern int line6_dumpreq_initbuf(struct line6_dump_request *l6dr,
-				 const void *buf, size_t len, int num);
-extern void line6_invalidate_current(struct line6_dump_request *l6dr);
-extern void line6_dump_wait(struct line6_dump_request *l6dr);
-extern int line6_dump_wait_interruptible(struct line6_dump_request *l6dr);
-extern int line6_dump_wait_timeout(struct line6_dump_request *l6dr,
-				   long timeout);
-
-#endif
-- 
1.8.0


  parent reply	other threads:[~2012-11-22 19:52 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 ` [PATCH 26/46] staging: line6: drop midi_postprocess flag Stefan Hajnoczi
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 ` Stefan Hajnoczi [this message]
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-47-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