aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/line6 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-23staging: line6: fix midibuf.c coding style issueDomagoj Trsan1-3/+8
Fix the following checkpatch.pl warning: - else is not generally useful after a break or return Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: line6: do not return 0 from probe if no initialization doneAlexey Khoroshilov1-1/+1
There is a strange "return 0" in line6_probe() before any initialization of the module is done. It can lead to NULL pointer dereference in other functions. The patch proposes to return -ENODEV in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging/line6: blank line after declaration cleanupJerry Snitselaar6-1/+19
Fix coding style warnings reported by checkpath. Signed-off-by: Jerry Snitselaar <dev@snitselaar.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16staging/line6: Fix kzalloc coding style issueL. Alberto Giménez1-1/+1
Pass the actual variable to sizeof instead of a type definition. Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16staging: line6: Add blank lines after declarationsFabian Mewes3-0/+7
Use the more common kernel coding style. Signed-off-by: Fabian Mewes <architekt@coding4coffee.org> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-01Merge tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds5-33/+39
Pull staging driver updates from Greg KH: "Here's the huge drivers/staging/ update for 3.15-rc1. Loads of cleanup fixes, a few drivers removed, and some new ones added. All have been in linux-next for a while" * tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits) staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig staging: comedi: poc: remove obsolete driver staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE staging: octeon-usb: prevent memory corruption staging: usbip: fix line over 80 characters staging: usbip: fix quoted string split across lines Staging: unisys: Remove RETINT macro Staging: unisys: Remove FAIL macro Staging: unisys: Remove RETVOID macro Staging: unisys: Remove RETPTR macro Staging: unisys: Remove RETBOOL macro Staging: unisys: Remove FAIL_WPOSTCODE_1 macro Staging: unisys: Cleanup macros to get rid of goto statements Staging: unisys: include: Remove unused macros from timskmod.h staging: dgap: fix the rest of the checkpatch warnings in dgap.c Staging: bcm: Remove unnecessary parentheses staging: wlags49_h2: Delete unnecessary braces staging: wlags49_h2: Do not use assignment in if condition staging: wlags49_h2: Enclose macro in a do-while loop ...
2014-03-18staging: line6: Fix coding style problemMikhail Boiko1-0/+1
Fix style issue for eudyptula challenge Signed-off-by: Mikhail Boiko <mm.boiko@yandex.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17staging: line6: long line fixesDavide Berardi2-26/+30
Fixed some line over 80 characters. Signed-off-by: Davide Berardi <berardi.dav@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-16staging: line6: Fix line over 80 charactersGulsah Kose1-1/+2
Fix checkpatch.pl issue with line over 80 characters in midi.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-08staging:line6: Fix use of variable length arraysHimangi Saraogi1-2/+2
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 <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging: line6: Fix no space before tabs in usbdefs.hMonam Agarwal1-3/+3
This patch fixes the following checkpatch.pl issues in usbdefs.h: WARNING: no space before tabs Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging: line6: Fix unnecessary space after function pointer in driver.hMonam Agarwal1-1/+1
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 <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging: line6: Fix unnecessary space after function pointer in driver.cMonam Agarwal1-1/+1
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 <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14staging/line6: Convert to snd_card_new() with a device pointerTakashi Iwai3-6/+3
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-21staging: line6: Add support for POD HD400 to line6usb driverChris Bajumpaa3-1/+14
This patch adds support for the Line 6 POD HD400 to the line6usb driver. Signed-off-by: Chris Bajumpaa <cbajumpa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging:line6: fix line over 80 charactersEbru Akagunduz1-2/+3
Fix checkpatch.pl issues with line over 80 characters in playback.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse Warning of incorrect typeRashika Kheria1-3/+7
This patch fixes the following sparse warnings in toneport.c- drivers/staging/line6/toneport.c:329:48: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:329:48: expected short [signed] product drivers/staging/line6/toneport.c:329:48: got restricted __le16 [usertype] idProduct drivers/staging/line6/toneport.c:385:48: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:385:48: expected short [signed] product drivers/staging/line6/toneport.c:385:48: got restricted __le16 [usertype] idProduct drivers/staging/line6/toneport.c:438:64: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:438:64: expected short [signed] product drivers/staging/line6/toneport.c:438:64: got restricted __le16 [usertype] idProduct Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse Warning of restricted __le16 degrades to integerRashika Kheria1-2/+2
This patch fixes the following sparse warning in toneport.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse warning of restricted __le16 degrades to integerRashika Kheria1-3/+3
This patch fixes the following sparse warning in driver.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: line6: replacing -EINVAL with retval in driver.cAshvini Varatharaj1-1/+1
drivers/staging/line6/driver.c:208 line6_send_raw_message_async_part() info: why not propagate 'retval' from usb_submit_urb() instead of (-22)? Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: line6: replacing -EINVAL with retvalAshvini Varatharaj1-1/+1
drivers/staging/line6/midi.c:147 send_midi_async() info: why not propagate 'retval' from usb_submit_urb() instead of (-22)? Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: line6: midi: Use NULL instead of 0 for pointersSachin Kamat1-1/+1
Use NULL instead of 0 for pointers. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: line6: add bounds check in snd_toneport_source_put()Dan Carpenter1-3/+7
"source" comes from the user in snd_ctl_elem_write() so it needs to be checked. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24staging: line6: use default sysfs attribute macrosGreg Kroah-Hartman4-39/+21
Move to use the DEVICE_ATTR_RW/RO macros, making it easier to audit the sysfs file permissions, and get rid of the "empty" callback for read-only files, saving lines of code. Cc: Stefan Hajnoczi <stefanha@gmail.com> Cc: Laurent Navet <laurent.navet@gmail.com> Cc: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-15staging: line6: Fix unlocked snd_pcm_stop() callTakashi Iwai1-1/+4
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-24staging: line6: avoid __sync_fetch_and_{and,or}Arnd Bergmann1-8/+15
__sync_fetch_and_and and __sync_fetch_and_or are functions that are provided by gcc and depending on the target architecture may be implemented in libgcc, which is not always available in the kernel. This leads to a build failure on ARMv5: drivers/built-in.o: In function `line6_pcm_release': :(.text+0x3bfe80): undefined reference to `__sync_fetch_and_and_4' drivers/built-in.o: In function `line6_pcm_acquire': :(.text+0x3bff30): undefined reference to `__sync_fetch_and_or_4' To work around this, we can use the kernel-provided cmpxchg macro. Build-tested only. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Markus Grabner <grabner@icg.tugraz.at> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11staging: line6: pod.c: fix checkpatch warningLaurent Navet1-2/+1
- WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11staging: Remove unnecessary OOM messagesJoe Perches2-27/+4
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: clean up line6_variax_process_message()Stefan Hajnoczi1-14/+0
Previous versions of the line6 driver snooped MIDI traffic in order to make device state accessible via sysfs attributes. This involved a lot of logic in line6_variax_process_message() that has since been removed. Drop unused conditionals in line6_variax_process_message(). Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: clean up line6_pod_process_message()Stefan Hajnoczi1-77/+19
Previous versions of the line6 driver snooped MIDI traffic in order to make device state accessible via sysfs attributes. This involved a lot of logic in line6_pod_process_message() that has since been removed. Drop unused conditionals in line6_pod_process_message() and reduce the levels of indentation. Only two MIDI messages are still tracked: the POD version message on startup and monitor level changes originating from the device. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: drop CONFIG_LINE6_USB_DUMP_PCMStefan Hajnoczi5-79/+0
The CONFIG_LINE6_USB_DUMP_PCM config option prints a hexdump of PCM audio data as URBs are sent and received. The usbmon feature should be used instead of manually dumping PCM URBs. There are a few advantages to using usbmon: * Can be turned on/off at runtime * Provides full USB-level traffic * tcpdump and wireshark support for powerful analysis * No driver-specific code is required This is the last user of line6_write_hexdump() so we drop it too. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: avoid CamelCase POD_* enums in pod.cStefan Hajnoczi1-5/+5
Fix the following checkpatch.pl warnings: WARNING: Avoid CamelCase: <POD_monitor_level> #4512: FILE: staging/line6/pod.c:41: + POD_monitor_level = 0x04, WARNING: Avoid CamelCase: <POD_system_invalid> #4513: FILE: staging/line6/pod.c:42: + POD_system_invalid = 0x10000 Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: rename MidiBuffer to avoid CamelCaseStefan Hajnoczi5-27/+28
Fix checkpatch.pl warnings related to MidiBuffer: WARNING: Avoid CamelCase: <MidiBuffer> #947: FILE: staging/line6/driver.c:363: + struct MidiBuffer *mb = &line6->line6midi->midibuf_in; Rename MidiBuffer to midi_buffer. Note that "midibuf" would be another good name but sound/oss/midibuf.c already uses it for a different concept. Avoid possible confusion by using "midi_buffer" instead. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: use pr_err() instead of printk(KERN_ERR, ...)Stefan Hajnoczi1-1/+1
Fix the following checkpatch.pl warning: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... #1861: FILE: staging/line6/driver.h:56: + printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \ Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: wrap comment to 80 chars in driver.cStefan Hajnoczi1-1/+1
Fix the following checkpatch.pl warning: WARNING: line over 80 characters #1107: FILE: staging/line6/driver.c:523: + /* Wait for data length. We'll get a couple of 0xff until length arrives. */ Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: wrap lines to 80 chars in pod.cStefan Hajnoczi1-2/+5
Fix the following checkpatch.pl warnings: WARNING: line over 80 characters #4508: FILE: staging/line6/pod.c:37: + /* POD_SYSEX_DUMPMEM2 = 0x76 */ /* dumps entire internal memory of PODxt Pro */ WARNING: line over 80 characters #4630: FILE: staging/line6/pod.c:159: + if (memcmp(buf + 1, line6_midi_id, sizeof(line6_midi_id)) == 0) { Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: drop ToneportSourceInfo CamelCase nameStefan Hajnoczi1-4/+2
Fix the following checkpatch.pl warning: WARNING: Avoid CamelCase: <ToneportSourceInfo> #5383: FILE: staging/line6/toneport.c:90: +struct ToneportSourceInfo { Since the struct is only used to define the global toneport_source_info[] table, I have chosen to make the struct anonymous and part of the table definition. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: delete an unused functionDan Carpenter2-13/+0
line6_send_sysex_message_async() isn't called from anywhere. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: Use kmemdup rather than duplicating its implementationLaurent Navet1-3/+2
staging: line6: driver.c The semantic patch that makes this output is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: pcm.c fix checkpatch issuesLaurent Navet1-12/+18
fix those checkpatch issues drivers/staging/line6/pcm.c:84: WARNING: simple_strtoul is obsolete, use kstrtoul instead call to obsolete simple_strtoul() replaced by kstrtoint() drivers/staging/line6/pcm.c:423: ERROR: switch and case should be at the same indent realigns comments Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop unused dumprequest codeStefan Hajnoczi3-212/+0
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop dump requests from pod startupStefan Hajnoczi2-47/+4
The pod startup procedure dumps model data. This is no longer useful since the sysfs attrs which expose this information to userspace have been removed. The dump request wasn't been processed anymore. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop dump requests from variax startupStefan Hajnoczi2-117/+4
The variax startup procedure dumps model data. This is no longer useful since the sysfs attrs which expose this information to userspace have been removed. The dump request wasn't been processed anymore. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax model_data fieldStefan Hajnoczi2-47/+0
The sysfs attrs to access the model dump have been removed so it's safe to drop the model_data field. The next step will be to simplify the startup process since we no longer need to fetch this data via dump requests, but that will be done in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop unused pod atomic_flags fieldStefan Hajnoczi2-16/+0
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop pod prog_data buffersStefan Hajnoczi2-68/+3
The driver no longer keeps state of MIDI-accessible device parameters. Drop the buffers but be careful to keep the device startup procedure working even though we no longer store the contents of the dump request. The startup procedure will be simplified in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop MIDI parameter sysfs attrsStefan Hajnoczi6-1214/+0
Both pod.c and variax.c expose the device's MIDI parameters as sysfs attrs. Knowledge of MIDI constants should be in userspace, not in the driver. Drop the sysfs attrs and let userspace interpret parameters it cares about instead. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop amp/effects dump request triggersStefan Hajnoczi1-9/+0
Since the driver no longer needs to keep state of device parameters it is no longer necessary to refresh state when messages that affect other parameters are sent. Drop the code to trigger a dump when amp/effects are changed. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop CONFIG_LINE6_USB_RAWStefan Hajnoczi2-25/+0
Now that both pod.c and variax.c have removed their raw sysfs attrs, the CONFIG_LINE6_USB_RAW config option can be dropped. The drivers are being stripped down to just PCM and MIDI I/O so there is less state and filtering. Therefore it's no longer necessary to have a special sysfs attr to bypass the filtering ("raw"). Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax raw sysfs attrsStefan Hajnoczi1-73/+0
Note that VARIAX_SYSEX_ACTIVATE was never used so drop it along with the other VARIAX_SYSEX_* constants which are now unused. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>