summaryrefslogtreecommitdiff
path: root/drivers/staging/line6
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-02-27 21:09:55 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:54:25 -0700
commita49e483835823ab97028f396531d83b6668734cf (patch)
tree91a426aeb1a6201bf2163e9f175093a128b5b05f /drivers/staging/line6
parent536165d8ef6933131bf7166338eafa77b75f8bb7 (diff)
Staging: line6: coding style cleanups for .h files.
Mostly all line length issues. Skipped the control.h file as it makes sense to leave it alone. Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6')
-rw-r--r--drivers/staging/line6/capture.h3
-rw-r--r--drivers/staging/line6/config.h3
-rw-r--r--drivers/staging/line6/driver.h48
-rw-r--r--drivers/staging/line6/dumprequest.h11
-rw-r--r--drivers/staging/line6/midi.h6
-rw-r--r--drivers/staging/line6/midibuf.h6
-rw-r--r--drivers/staging/line6/pcm.h44
-rw-r--r--drivers/staging/line6/playback.h3
-rw-r--r--drivers/staging/line6/pod.h9
-rw-r--r--drivers/staging/line6/toneport.h3
-rw-r--r--drivers/staging/line6/usbdefs.h27
-rw-r--r--drivers/staging/line6/variax.h3
12 files changed, 108 insertions, 58 deletions
diff --git a/drivers/staging/line6/capture.h b/drivers/staging/line6/capture.h
index 7b92e4de3927..5c44464d29d4 100644
--- a/drivers/staging/line6/capture.h
+++ b/drivers/staging/line6/capture.h
@@ -24,7 +24,8 @@ extern struct snd_pcm_ops snd_line6_capture_ops;
extern int create_audio_in_urbs(struct snd_line6_pcm *line6pcm);
-extern int snd_line6_capture_trigger(struct snd_pcm_substream *substream, int cmd);
+extern int snd_line6_capture_trigger(struct snd_pcm_substream *substream,
+ int cmd);
extern void unlink_wait_clear_audio_in_urbs(struct snd_line6_pcm *line6pcm);
diff --git a/drivers/staging/line6/config.h b/drivers/staging/line6/config.h
index 8cefdbac9d22..adad130c5dc2 100644
--- a/drivers/staging/line6/config.h
+++ b/drivers/staging/line6/config.h
@@ -34,7 +34,8 @@
#define CREATE_RAW_FILE 0
#if DO_DEBUG_MESSAGES
-#define CHECKPOINT printk("line6usb: %s (%s:%d)\n", __FUNCTION__, __FILE__, __LINE__)
+#define CHECKPOINT printk(KERN_INFO "line6usb: %s (%s:%d)\n", \
+ __func__, __FILE__, __LINE__)
#endif
#if DO_DEBUG_MESSAGES
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 20966534259d..9908bfa6afaf 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -55,10 +55,17 @@
#define LINE6_CHANNEL_MASK 0x0f
-#define MISSING_CASE printk("line6usb driver bug: missing case in %s:%d\n", __FILE__, __LINE__)
+#define MISSING_CASE \
+ printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \
+ __FILE__, __LINE__)
-#define CHECK_RETURN(x) if((err = x) < 0) return err
+#define CHECK_RETURN(x) \
+do { \
+ err = x; \
+ if (err < 0) \
+ return err; \
+} while (0)
extern const unsigned char line6_midi_id[3];
@@ -166,19 +173,32 @@ struct usb_line6 {
};
-extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, int code2, int size);
-extern ssize_t line6_nop_read(struct device *dev, struct device_attribute *attr, char *buf);
-extern ssize_t line6_nop_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
-extern int line6_read_data(struct usb_line6 *line6, int address, void *data, size_t datalen);
-extern int line6_read_serial_number(struct usb_line6 *line6, int *serial_number);
+extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1,
+ int code2, int size);
+extern ssize_t line6_nop_read(struct device *dev,
+ struct device_attribute *attr, char *buf);
+extern ssize_t line6_nop_write(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count);
+extern int line6_read_data(struct usb_line6 *line6, int address, void *data,
+ size_t datalen);
+extern int line6_read_serial_number(struct usb_line6 *line6,
+ int *serial_number);
extern int line6_send_program(struct usb_line6 *line6, int value);
-extern int line6_send_raw_message(struct usb_line6 *line6, const char *buffer, int size);
-extern int line6_send_raw_message_async(struct usb_line6 *line6, const char *buffer, int size);
-extern int line6_send_sysex_message(struct usb_line6 *line6, const char *buffer, int size);
-extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
-extern int line6_transmit_parameter(struct usb_line6 *line6, int param, int value);
-extern int line6_write_data(struct usb_line6 *line6, int address, void *data, size_t datalen);
-extern void line6_write_hexdump(struct usb_line6 *line6, char dir, const unsigned char *buffer, int size);
+extern int line6_send_raw_message(struct usb_line6 *line6, const char *buffer,
+ int size);
+extern int line6_send_raw_message_async(struct usb_line6 *line6,
+ const char *buffer, int size);
+extern int line6_send_sysex_message(struct usb_line6 *line6,
+ const char *buffer, int size);
+extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count);
+extern int line6_transmit_parameter(struct usb_line6 *line6, int param,
+ int value);
+extern int line6_write_data(struct usb_line6 *line6, int address, void *data,
+ size_t datalen);
+extern void line6_write_hexdump(struct usb_line6 *line6, char dir,
+ const unsigned char *buffer, int size);
#endif
diff --git a/drivers/staging/line6/dumprequest.h b/drivers/staging/line6/dumprequest.h
index e0b38bbc1ad2..1975d54b3c20 100644
--- a/drivers/staging/line6/dumprequest.h
+++ b/drivers/staging/line6/dumprequest.h
@@ -72,15 +72,18 @@ struct line6_dump_request {
};
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);
+extern int line6_dump_request_async(struct line6_dump_request *l6dr,
+ struct usb_line6 *line6, int num);
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 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_startup_delayed(struct line6_dump_request *l6dr, int seconds,
- void (*function)(unsigned long), void *data);
+ void (*function)(unsigned long), void *data);
extern int line6_wait_dump(struct line6_dump_request *l6dr, int nonblock);
diff --git a/drivers/staging/line6/midi.h b/drivers/staging/line6/midi.h
index be05a54205c4..c69fd118957b 100644
--- a/drivers/staging/line6/midi.h
+++ b/drivers/staging/line6/midi.h
@@ -21,8 +21,7 @@
#define MIDI_BUFFER_SIZE 1024
-struct snd_line6_midi
-{
+struct snd_line6_midi {
/**
Pointer back to the Line6 driver data structure.
*/
@@ -81,7 +80,8 @@ struct snd_line6_midi
extern int line6_init_midi(struct usb_line6 *line6);
-extern void line6_midi_receive(struct usb_line6 *line6, unsigned char *data, int length);
+extern void line6_midi_receive(struct usb_line6 *line6, unsigned char *data,
+ int length);
#endif
diff --git a/drivers/staging/line6/midibuf.h b/drivers/staging/line6/midibuf.h
index 0e7762c677c4..9877581bcd9a 100644
--- a/drivers/staging/line6/midibuf.h
+++ b/drivers/staging/line6/midibuf.h
@@ -13,8 +13,7 @@
#define MIDIBUF_H
-struct MidiBuffer
-{
+struct MidiBuffer {
unsigned char *buf;
int size;
int split;
@@ -33,7 +32,8 @@ extern int midibuf_read(struct MidiBuffer *mb, unsigned char *data, int length);
extern void midibuf_reset(struct MidiBuffer *mb);
extern int midibuf_skip_message(struct MidiBuffer *mb, unsigned short mask);
extern void midibuf_status(struct MidiBuffer *mb);
-extern int midibuf_write(struct MidiBuffer *mb, unsigned char *data, int length);
+extern int midibuf_write(struct MidiBuffer *mb, unsigned char *data,
+ int length);
#endif
diff --git a/drivers/staging/line6/pcm.h b/drivers/staging/line6/pcm.h
index 90f8bb9816d5..53db217cd42d 100644
--- a/drivers/staging/line6/pcm.h
+++ b/drivers/staging/line6/pcm.h
@@ -23,16 +23,24 @@
#include "usbdefs.h"
-#define LINE6_ISO_BUFFERS 8 /* number of URBs */
-#define LINE6_ISO_PACKETS 2 /* number of USB frames per URB */
-#define LINE6_ISO_INTERVAL 1 /* in a "full speed" device (such as the PODxt Pro) this means 1ms */
-#define LINE6_ISO_PACKET_SIZE_MAX 252 /* this should be queried dynamically from the USB interface! */
+/* number of URBs */
+#define LINE6_ISO_BUFFERS 8
+
+/* number of USB frames per URB */
+#define LINE6_ISO_PACKETS 2
+
+/* in a "full speed" device (such as the PODxt Pro) this means 1ms */
+#define LINE6_ISO_INTERVAL 1
+
+/* this should be queried dynamically from the USB interface! */
+#define LINE6_ISO_PACKET_SIZE_MAX 252
/*
Extract the messaging device from the substream instance
*/
-#define s2m(s) (((struct snd_line6_pcm *)snd_pcm_substream_chip(s))->line6->ifcdev)
+#define s2m(s) (((struct snd_line6_pcm *) \
+ snd_pcm_substream_chip(s))->line6->ifcdev)
enum {
@@ -48,8 +56,7 @@ struct line6_pcm_properties {
int bytes_per_frame;
};
-struct snd_line6_pcm
-{
+struct snd_line6_pcm {
/**
Pointer back to the Line6 driver data structure.
*/
@@ -82,8 +89,8 @@ struct snd_line6_pcm
/**
Temporary buffer for capture.
- Since the packet size is not known in advance, this buffer is large enough
- to store maximum size packets.
+ Since the packet size is not known in advance, this buffer is
+ large enough to store maximum size packets.
*/
unsigned char *buffer_in;
@@ -94,7 +101,8 @@ struct snd_line6_pcm
/**
Count processed bytes for playback.
- This is modulo period size (to determine when a period is finished).
+ This is modulo period size (to determine when a period is
+ finished).
*/
unsigned bytes_out;
@@ -110,14 +118,16 @@ struct snd_line6_pcm
/**
Processed frame position in the playback buffer.
- The contents of the output ring buffer have been consumed by the USB
- subsystem (i.e., sent to the USB device) up to this position.
+ The contents of the output ring buffer have been consumed by
+ the USB subsystem (i.e., sent to the USB device) up to this
+ position.
*/
snd_pcm_uframes_t pos_out_done;
/**
Count processed bytes for capture.
- This is modulo period size (to determine when a period is finished).
+ This is modulo period size (to determine when a period is
+ finished).
*/
unsigned bytes_in;
@@ -133,8 +143,9 @@ struct snd_line6_pcm
/**
Processed frame position in the capture buffer.
- The contents of the output ring buffer have been consumed by the USB
- subsystem (i.e., sent to the USB device) up to this position.
+ The contents of the output ring buffer have been consumed by
+ the USB subsystem (i.e., sent to the USB device) up to this
+ position.
*/
snd_pcm_uframes_t pos_in_done;
@@ -202,7 +213,8 @@ struct snd_line6_pcm
};
-extern int line6_init_pcm(struct usb_line6 *line6, struct line6_pcm_properties *properties);
+extern int line6_init_pcm(struct usb_line6 *line6,
+ struct line6_pcm_properties *properties);
extern int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd);
extern int snd_line6_prepare(struct snd_pcm_substream *substream);
diff --git a/drivers/staging/line6/playback.h b/drivers/staging/line6/playback.h
index 019c40f2cdb4..db1e48b3596e 100644
--- a/drivers/staging/line6/playback.h
+++ b/drivers/staging/line6/playback.h
@@ -22,7 +22,8 @@ extern struct snd_pcm_ops snd_line6_playback_ops;
extern int create_audio_out_urbs(struct snd_line6_pcm *line6pcm);
-extern int snd_line6_playback_trigger(struct snd_pcm_substream *substream, int cmd);
+extern int snd_line6_playback_trigger(struct snd_pcm_substream *substream,
+ int cmd);
extern void unlink_wait_clear_audio_out_urbs(struct snd_line6_pcm *line6pcm);
diff --git a/drivers/staging/line6/pod.h b/drivers/staging/line6/pod.h
index 0db59484c4ba..7051ca613819 100644
--- a/drivers/staging/line6/pod.h
+++ b/drivers/staging/line6/pod.h
@@ -49,8 +49,7 @@
Data structure for values that need to be requested explicitly.
This is the case for system and tuner settings.
*/
-struct ValueWait
-{
+struct ValueWait {
unsigned short value;
wait_queue_head_t wait;
};
@@ -194,10 +193,12 @@ struct usb_line6_pod {
extern void pod_disconnect(struct usb_interface *interface);
extern int pod_init(struct usb_interface *interface, struct usb_line6_pod *pod);
-extern void pod_midi_postprocess(struct usb_line6_pod *pod, unsigned char *data, int length);
+extern void pod_midi_postprocess(struct usb_line6_pod *pod,
+ unsigned char *data, int length);
extern void pod_process_message(struct usb_line6_pod *pod);
extern void pod_receive_parameter(struct usb_line6_pod *pod, int param);
-extern void pod_transmit_parameter(struct usb_line6_pod *pod, int param, int value);
+extern void pod_transmit_parameter(struct usb_line6_pod *pod, int param,
+ int value);
#endif
diff --git a/drivers/staging/line6/toneport.h b/drivers/staging/line6/toneport.h
index cd0b19fe7c84..bddc58dd7e3a 100644
--- a/drivers/staging/line6/toneport.h
+++ b/drivers/staging/line6/toneport.h
@@ -38,7 +38,8 @@ struct usb_line6_toneport {
extern void toneport_disconnect(struct usb_interface *interface);
-extern int toneport_init(struct usb_interface *interface, struct usb_line6_toneport *toneport);
+extern int toneport_init(struct usb_interface *interface,
+ struct usb_line6_toneport *toneport);
#endif
diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index 15dbca757ac4..c38f31f2f421 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -50,16 +50,25 @@
#define LINE6_BIT_TONEPORT_UX2 (1 << 12)
#define LINE6_BIT_VARIAX (1 << 13)
-#define LINE6_BITS_PRO (LINE6_BIT_BASSPODXTPRO | LINE6_BIT_PODXTPRO)
-#define LINE6_BITS_LIVE (LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_PODXTLIVE | LINE6_BIT_PODX3LIVE)
-#define LINE6_BITS_PODXTALL (LINE6_BIT_PODXT | LINE6_BIT_PODXTLIVE | LINE6_BIT_PODXTPRO)
-#define LINE6_BITS_BASSPODXTALL (LINE6_BIT_BASSPODXT | LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_BASSPODXTPRO)
+#define LINE6_BITS_PRO (LINE6_BIT_BASSPODXTPRO | \
+ LINE6_BIT_PODXTPRO)
+#define LINE6_BITS_LIVE (LINE6_BIT_BASSPODXTLIVE | \
+ LINE6_BIT_PODXTLIVE | \
+ LINE6_BIT_PODX3LIVE)
+#define LINE6_BITS_PODXTALL (LINE6_BIT_PODXT | \
+ LINE6_BIT_PODXTLIVE | \
+ LINE6_BIT_PODXTPRO)
+#define LINE6_BITS_BASSPODXTALL (LINE6_BIT_BASSPODXT | \
+ LINE6_BIT_BASSPODXTLIVE | \
+ LINE6_BIT_BASSPODXTPRO)
-#define LINE6_BIT_CONTROL (1 << 0) /* device supports settings parameter via USB */
-#define LINE6_BIT_PCM (1 << 1) /* device supports PCM input/output via USB */
-#define LINE6_BIT_CONTROL_PCM (LINE6_BIT_CONTROL | LINE6_BIT_PCM)
+/* device supports settings parameter via USB */
+#define LINE6_BIT_CONTROL (1 << 0)
+/* device supports PCM input/output via USB */
+#define LINE6_BIT_PCM (1 << 1)
+#define LINE6_BIT_CONTROL_PCM (LINE6_BIT_CONTROL | LINE6_BIT_PCM)
-#define LINE6_FALLBACK_INTERVAL 10
-#define LINE6_FALLBACK_MAXPACKETSIZE 16
+#define LINE6_FALLBACK_INTERVAL 10
+#define LINE6_FALLBACK_MAXPACKETSIZE 16
#endif
diff --git a/drivers/staging/line6/variax.h b/drivers/staging/line6/variax.h
index 286df248c816..ee330ba30898 100644
--- a/drivers/staging/line6/variax.h
+++ b/drivers/staging/line6/variax.h
@@ -100,7 +100,8 @@ struct usb_line6_variax {
extern void variax_disconnect(struct usb_interface *interface);
-extern int variax_init(struct usb_interface *interface, struct usb_line6_variax *variax);
+extern int variax_init(struct usb_interface *interface,
+ struct usb_line6_variax *variax);
extern void variax_process_message(struct usb_line6_variax *variax);