From 1cad608ec29ef484efb0986cbbd57a16d3f49981 Mon Sep 17 00:00:00 2001 From: Monam Agarwal Date: Thu, 27 Feb 2014 21:05:18 +0530 Subject: Staging: line6: Fix unnecessary space after function pointer in driver.c This patch fixes the following checkpatch.pl issues in driver.c: WARNING: unnecessary space after function pointer in driver.c Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 7a6d85ebb29b..e7a9d8dae499 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -217,7 +217,7 @@ static int line6_send_raw_message_async_part(struct message *msg, Setup and start timer. */ void line6_start_timer(struct timer_list *timer, unsigned int msecs, - void (*function) (unsigned long), unsigned long data) + void (*function)(unsigned long), unsigned long data) { setup_timer(timer, function, data); timer->expires = jiffies + msecs * HZ / 1000; -- cgit v1.2.3 From 56733e979328095852fd960f303ab80ce0dc9065 Mon Sep 17 00:00:00 2001 From: Monam Agarwal Date: Thu, 27 Feb 2014 21:06:58 +0530 Subject: Staging: line6: Fix unnecessary space after function pointer in driver.h This patch fixes the following checkpatch.pl issues in driver.h: WARNING: unnecessary space after function pointer in driver.h Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index 34ae95e7e512..16e3fc2f1f15 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h @@ -204,7 +204,7 @@ extern int line6_send_sysex_message(struct usb_line6 *line6, extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); extern void line6_start_timer(struct timer_list *timer, unsigned int msecs, - void (*function) (unsigned long), + void (*function)(unsigned long), unsigned long data); extern int line6_transmit_parameter(struct usb_line6 *line6, int param, u8 value); -- cgit v1.2.3 From fe6c0f92b69128620d0fec4ab269468d514ce874 Mon Sep 17 00:00:00 2001 From: Monam Agarwal Date: Thu, 27 Feb 2014 21:08:30 +0530 Subject: Staging: line6: Fix no space before tabs in usbdefs.h This patch fixes the following checkpatch.pl issues in usbdefs.h: WARNING: no space before tabs Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/usbdefs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h index 90cadddec56e..eda04562d576 100644 --- a/drivers/staging/line6/usbdefs.h +++ b/drivers/staging/line6/usbdefs.h @@ -91,9 +91,9 @@ enum { LINE6_BITS_PODXTALL = LINE6_BIT_PODXT | LINE6_BIT_PODXTLIVE | LINE6_BIT_PODXTPRO, LINE6_BITS_PODX3ALL = LINE6_BIT_PODX3 | LINE6_BIT_PODX3LIVE, - LINE6_BITS_PODHDALL = LINE6_BIT_PODHD300 | - LINE6_BIT_PODHD400 | - LINE6_BIT_PODHD500, + LINE6_BITS_PODHDALL = LINE6_BIT_PODHD300 | + LINE6_BIT_PODHD400 | + LINE6_BIT_PODHD500, LINE6_BITS_BASSPODXTALL = LINE6_BIT_BASSPODXT | LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_BASSPODXTPRO -- cgit v1.2.3 From f2459201c72e8f8553644505eed19954d4c3a023 Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Sun, 9 Mar 2014 05:47:12 +0530 Subject: staging:line6: Fix use of variable length arrays This patch fixes the sparse warning: drivers/staging/line6/midi.c:50:34: warning: Variable length array is used. The size is same as the variable LINE6_FALLBACK_MAXPACKETSIZE, so use that. Signed-off-by: Himangi Saraogi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index 3f6d78c585fb..a95c85785213 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c @@ -47,7 +47,7 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) struct snd_line6_midi *line6midi = line6->line6midi; struct midi_buffer *mb = &line6midi->midibuf_out; unsigned long flags; - unsigned char chunk[line6->max_packet_size]; + unsigned char chunk[LINE6_FALLBACK_MAXPACKETSIZE]; int req, done; spin_lock_irqsave(&line6->line6midi->midi_transmit_lock, flags); @@ -64,7 +64,7 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) } for (;;) { - done = line6_midibuf_read(mb, chunk, line6->max_packet_size); + done = line6_midibuf_read(mb, chunk, LINE6_FALLBACK_MAXPACKETSIZE); if (done == 0) break; -- cgit v1.2.3 From 6461900342b735e8923ccee50c2d290f4ea478d5 Mon Sep 17 00:00:00 2001 From: Gulsah Kose Date: Sat, 15 Mar 2014 23:54:42 +0200 Subject: staging: line6: Fix line over 80 characters Fix checkpatch.pl issue with line over 80 characters in midi.c Signed-off-by: Gulsah Kose Signed-off-by: Peter P Waskiewicz Jr --- drivers/staging/line6/midi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index a95c85785213..5aaef2b4ccfa 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c @@ -64,7 +64,8 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) } for (;;) { - done = line6_midibuf_read(mb, chunk, LINE6_FALLBACK_MAXPACKETSIZE); + done = line6_midibuf_read(mb, chunk, + LINE6_FALLBACK_MAXPACKETSIZE); if (done == 0) break; -- cgit v1.2.3 From ba79e52b697f1ead52a0f9ba35aeac31a2c4e29a Mon Sep 17 00:00:00 2001 From: Davide Berardi Date: Mon, 17 Mar 2014 03:34:41 +0100 Subject: staging: line6: long line fixes Fixed some line over 80 characters. Signed-off-by: Davide Berardi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/driver.c | 54 ++++++++++++++++++++++------------------- drivers/staging/line6/usbdefs.h | 2 +- 2 files changed, 30 insertions(+), 26 deletions(-) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index e7a9d8dae499..77f1b421e957 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -57,28 +57,32 @@ static const struct usb_device_id line6_id_table[] = { MODULE_DEVICE_TABLE(usb, line6_id_table); +#define L6PROP(dev_bit, dev_id, dev_name, dev_cap)\ + {.device_bit = LINE6_BIT_##dev_bit, .id = dev_id,\ + .name = dev_name, .capabilities = LINE6_BIT_##dev_cap} + /* *INDENT-OFF* */ -static struct line6_properties line6_properties_table[] = { - { LINE6_BIT_BASSPODXT, "BassPODxt", "BassPODxt", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_BASSPODXTLIVE, "BassPODxtLive", "BassPODxt Live", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_BASSPODXTPRO, "BassPODxtPro", "BassPODxt Pro", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_GUITARPORT, "GuitarPort", "GuitarPort", LINE6_BIT_PCM }, - { LINE6_BIT_POCKETPOD, "PocketPOD", "Pocket POD", LINE6_BIT_CONTROL }, - { LINE6_BIT_PODHD300, "PODHD300", "POD HD300", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_PODHD400, "PODHD400", "POD HD400", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_PODHD500, "PODHD500", "POD HD500", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_PODSTUDIO_GX, "PODStudioGX", "POD Studio GX", LINE6_BIT_PCM }, - { LINE6_BIT_PODSTUDIO_UX1, "PODStudioUX1", "POD Studio UX1", LINE6_BIT_PCM }, - { LINE6_BIT_PODSTUDIO_UX2, "PODStudioUX2", "POD Studio UX2", LINE6_BIT_PCM }, - { LINE6_BIT_PODX3, "PODX3", "POD X3", LINE6_BIT_PCM }, - { LINE6_BIT_PODX3LIVE, "PODX3Live", "POD X3 Live", LINE6_BIT_PCM }, - { LINE6_BIT_PODXT, "PODxt", "PODxt", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_PODXTLIVE, "PODxtLive", "PODxt Live", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_PODXTPRO, "PODxtPro", "PODxt Pro", LINE6_BIT_CONTROL_PCM_HWMON }, - { LINE6_BIT_TONEPORT_GX, "TonePortGX", "TonePort GX", LINE6_BIT_PCM }, - { LINE6_BIT_TONEPORT_UX1, "TonePortUX1", "TonePort UX1", LINE6_BIT_PCM }, - { LINE6_BIT_TONEPORT_UX2, "TonePortUX2", "TonePort UX2", LINE6_BIT_PCM }, - { LINE6_BIT_VARIAX, "Variax", "Variax Workbench", LINE6_BIT_CONTROL }, +static const struct line6_properties line6_properties_table[] = { + L6PROP(BASSPODXT, "BassPODxt", "BassPODxt", CTRL_PCM_HW), + L6PROP(BASSPODXTLIVE, "BassPODxtLive", "BassPODxt Live", CTRL_PCM_HW), + L6PROP(BASSPODXTPRO, "BassPODxtPro", "BassPODxt Pro", CTRL_PCM_HW), + L6PROP(GUITARPORT, "GuitarPort", "GuitarPort", PCM), + L6PROP(POCKETPOD, "PocketPOD", "Pocket POD", CONTROL), + L6PROP(PODHD300, "PODHD300", "POD HD300", CTRL_PCM_HW), + L6PROP(PODHD400, "PODHD400", "POD HD400", CTRL_PCM_HW), + L6PROP(PODHD500, "PODHD500", "POD HD500", CTRL_PCM_HW), + L6PROP(PODSTUDIO_GX, "PODStudioGX", "POD Studio GX", PCM), + L6PROP(PODSTUDIO_UX1, "PODStudioUX1", "POD Studio UX1", PCM), + L6PROP(PODSTUDIO_UX2, "PODStudioUX2", "POD Studio UX2", PCM), + L6PROP(PODX3, "PODX3", "POD X3", PCM), + L6PROP(PODX3LIVE, "PODX3Live", "POD X3 Live", PCM), + L6PROP(PODXT, "PODxt", "PODxt", CTRL_PCM_HW), + L6PROP(PODXTLIVE, "PODxtLive", "PODxt Live", CTRL_PCM_HW), + L6PROP(PODXTPRO, "PODxtPro", "PODxt Pro", CTRL_PCM_HW), + L6PROP(TONEPORT_GX, "TonePortGX", "TonePort GX", PCM), + L6PROP(TONEPORT_UX1, "TonePortUX1", "TonePort UX1", PCM), + L6PROP(TONEPORT_UX2, "TonePortUX2", "TonePort UX2", PCM), + L6PROP(VARIAX, "Variax", "Variax Workbench", CONTROL), }; /* *INDENT-ON* */ @@ -152,10 +156,10 @@ int line6_send_raw_message(struct usb_line6 *line6, const char *buffer, int retval; retval = usb_interrupt_msg(line6->usbdev, - usb_sndintpipe(line6->usbdev, - line6->ep_control_write), - (char *)frag_buf, frag_size, - &partial, LINE6_TIMEOUT * HZ); + usb_sndintpipe(line6->usbdev, + line6->ep_control_write), + (char *)frag_buf, frag_size, + &partial, LINE6_TIMEOUT * HZ); if (retval) { dev_err(line6->ifcdev, diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h index eda04562d576..2d1cc472bead 100644 --- a/drivers/staging/line6/usbdefs.h +++ b/drivers/staging/line6/usbdefs.h @@ -106,7 +106,7 @@ enum { /* device support hardware monitoring */ #define LINE6_BIT_HWMON (1 << 2) -#define LINE6_BIT_CONTROL_PCM_HWMON (LINE6_BIT_CONTROL | \ +#define LINE6_BIT_CTRL_PCM_HW (LINE6_BIT_CONTROL | \ LINE6_BIT_PCM | \ LINE6_BIT_HWMON) -- cgit v1.2.3 From b5f87cf913e6005e3d41db01ffa6d71c292271d9 Mon Sep 17 00:00:00 2001 From: Mikhail Boiko Date: Tue, 18 Mar 2014 23:59:46 +0200 Subject: staging: line6: Fix coding style problem Fix style issue for eudyptula challenge Signed-off-by: Mikhail Boiko Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/capture.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/staging/line6') diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index f8316b71f13d..0eda51d2e9a2 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -157,6 +157,7 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) copy two separate chunks. */ int len; + len = runtime->buffer_size - line6pcm->pos_in_done; if (len > 0) { -- cgit v1.2.3