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>
This commit is contained in:
Greg Kroah-Hartman 2009-02-27 21:09:55 -08:00
parent 536165d8ef
commit a49e483835
12 changed files with 108 additions and 58 deletions

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -72,12 +72,15 @@ 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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -50,13 +50,22 @@
#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 */
/* 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

View File

@ -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);