summaryrefslogtreecommitdiffstats
path: root/drivers/staging/most
Commit message (Collapse)AuthorAgeFilesLines
* drivers: most: add ALSA sound driverChristian Gromm2021-03-235-766/+0
| | | | | | | | | | This patch moves the ALSA sound driver out of the staging area and adds it to the stable part of the MOST driver. Modifications to the Makefiles and Kconfigs are done accordingly to not break the build. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1612865627-29950-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-02-042-4/+4
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-5-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: sound: use non-safe list iterationChristian Gromm2021-02-041-2/+2
| | | | | | | | | | This patch replaces the safe list iteration function with the non-safe one, as no list element is being deleted. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1612265890-18246-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: sound: add sanity check for function argumentChristian Gromm2021-02-041-0/+2
| | | | | | | | | | This patch checks the function parameter 'bytes' before doing the subtraction to prevent memory corruption. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1612282865-21846-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: net: use DEFINE_MUTEX() for mutex lockZheng Yongjun2020-12-281-2/+1
| | | | | | | | | mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201224132519.31504-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: Fix spelling mistake "tranceiver" -> "transceiver"Colin Ian King2020-12-091-1/+1
| | | | | | | | There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20201126224602.13878-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: most: use swabXX functions of kernelChristian Gromm2020-11-061-12/+2
| | | | | | | | | | This patch makes use of the swab16() and swab32() functions available in the kernel instead of using own implementations. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1604494242-3414-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: most: add character device interface driverChristian Gromm2020-09-075-563/+0
| | | | | | | | | This patch adds the character device (cdev) driver source file most_cdev.c and modifies the Makefiles and Kconfigs accordingly. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1597922595-27493-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: dim2: Add missing identifier name to function argumentNícolas F. R. A. Prado2020-08-181-3/+3
| | | | | | | | | | | | | | A function definition argument should have an identifier name according to checkpatch: WARNING: function definition argument 'struct platform_device *' should also have an identifier name Name it pdev as that name is already used throughout the code. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com> Link: https://lore.kernel.org/r/20200802223615.924307-1-nfraprado@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'staging-5.9-rc1' of ↵Linus Torvalds2020-08-068-1275/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver updates from Greg KH: "Here is the large set of Staging and IIO driver patches for 5.9-rc1. Lots of churn here, but overall the size increase in lines added is small, while adding a load of new IIO drivers. Major things in here: - lots and lots of IIO new drivers and frameworks added - IIO driver fixes and updates - lots of tiny coding style cleanups for staging drivers - vc04_services major reworks and cleanups We had 3 set of drivers move out of staging in this round as well: - wilc1000 wireless driver moved out of staging - speakup moved out of staging - most USB driver moved out of staging Full details are in the shortlog. All of these have been in linux-next with no reported issues. The last few changes here were to resolve reported linux-next issues, and they seem to have resolved the problems" * tag 'staging-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (428 commits) staging: most: fix up movement of USB driver staging: rts5208: clear alignment style issues staging: r8188eu: replace rtw_netdev_priv define with inline function staging: netlogic: clear alignment style issues staging: android: ashmem: Fix lockdep warning for write operation drivers: most: add USB adapter driver staging: most: Use %pM format specifier for MAC addresses staging: ks7010: Use %pM format specifier for MAC addresses staging: qlge: qlge_dbg: removed comment repition staging: wfx: Use flex_array_size() helper in memcpy() staging: rtl8723bs: Align macro definitions staging: rtl8723bs: Clean up function declations staging: rtl8723bs: Fix coding style errors drivers: staging: audio: Fix the missing header file for helper file staging: greybus: audio: Enable GB codec, audio module compilation. staging: greybus: audio: Add helper APIs for dynamic audio modules staging: greybus: audio: Resolve compilation error in topology parser staging: greybus: audio: Resolve compilation errors for GB codec module staging: greybus: audio: Maintain jack list within GB Audio module staging: greybus: audio: Update snd_jack FW usage as per new APIs ...
| * staging: most: fix up movement of USB driverGreg Kroah-Hartman2020-08-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | When moving the most usb driver out of staging, we forgot to remove the subdirectory out of the staging Makefile as well. Fixes: 97a6f772f36b ("drivers: most: add USB adapter driver") Cc: Christian Gromm <christian.gromm@microchip.com> Reported-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200802092139.GA140088@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * drivers: most: add USB adapter driverChristian Gromm2020-07-314-1189/+0
| | | | | | | | | | | | | | | | | | This patch adds the USB driver source file most_usb.c and modifies the Makefile and Kconfig accordingly. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1596198058-26541-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: Use %pM format specifier for MAC addressesAndy Shevchenko2020-07-311-4/+2
| | | | | | | | | | | | | | | | Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200730151506.38827-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: usb: remove NET dependencyChristian Gromm2020-07-291-2/+1
| | | | | | | | | | | | | | | | This patch removes the dependency to NET as it is no longer needed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1595927275-27462-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: sound: remove overcautious argument checkingChristian Gromm2020-06-251-3/+0
| | | | | | | | | | | | | | | | | | The interface pointer passed to a component API function cannot be NULL. This patch removes the unnecessary sanity check of this argument. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592924855-25569-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: sound: fix white spacesChristian Gromm2020-06-251-15/+0
| | | | | | | | | | | | | | | | This patch removes unnecessary empty lines. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592924855-25569-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: sound: fix return valuesChristian Gromm2020-06-251-5/+7
| | | | | | | | | | | | | | | | | | This patch returns the proper values when reporting an error to the caller. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592924855-25569-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: sound: fix error pathChristian Gromm2020-06-251-1/+3
| | | | | | | | | | | | | | | | | | Return error and exit the function in case registering the component with the core is failing. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592924855-25569-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: sound: remove noisy log messagesChristian Gromm2020-06-251-20/+4
| | | | | | | | | | | | | | | | | | This patch removes unnecessary log messages to avoid noise in the kernel log. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592924855-25569-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: simplify list iterationChristian Gromm2020-06-251-6/+3
| | | | | | | | | | | | | | | | | | | | This patch uses a less confusing list traversing structure to either return an item of the list that meets the prerequisites or NULL otherwise. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: fix return valuesChristian Gromm2020-06-251-3/+3
| | | | | | | | | | | | | | | | | | This patch makes use of the proper return values when reporting an error to the caller. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: fix up parenthesizingChristian Gromm2020-06-251-1/+1
| | | | | | | | | | | | | | | | This patch removes unnecessary parnthesis. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: remove overcautious parameter checkingChristian Gromm2020-06-251-7/+1
| | | | | | | | | | | | | | | | | | The interface pointer passed to a component API function cannot be NULL. This patch removes unnecessary sanity checks of the pointer. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: use dev_*() functions to print messagesChristian Gromm2020-06-251-6/+6
| | | | | | | | | | | | | | | | This patch removes the pr_*() functions and uses dev_*() instead. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: most: cdev: remove noisy log messagesChristian Gromm2020-06-251-20/+6
| | | | | | | | | | | | | | | | | | This patch removes unnecessary log messages to avoid noise in the kernel log. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()Kees Cook2020-07-301-1/+1
|/ | | | | | | | | | | This converts all the existing DECLARE_TASKLET() (and ...DISABLED) macros with DECLARE_TASKLET_OLD() in preparation for refactoring the tasklet callback type. All existing DECLARE_TASKLET() users had a "0" data argument, it has been removed here as well. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kees Cook <keescook@chromium.org>
* treewide: replace '---help---' in Kconfig files with 'help'Masahiro Yamada2020-06-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), the number of '---help---' has been gradually decreasing, but there are still more than 2400 instances. This commit finishes the conversion. While I touched the lines, I also fixed the indentation. There are a variety of indentation styles found. a) 4 spaces + '---help---' b) 7 spaces + '---help---' c) 8 spaces + '---help---' d) 1 space + 1 tab + '---help---' e) 1 tab + '---help---' (correct indentation) f) 1 tab + 1 space + '---help---' g) 1 tab + 2 spaces + '---help---' In order to convert all of them to 1 tab + 'help', I ran the following commend: $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/' Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* staging: most: usb: init return value in default path of switch/case expressionChristian Gromm2020-05-291-0/+1
| | | | | | | | | | This patch avoids returning an uninitialized value in the default path of the switch expression. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590669703-20004-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use function sysfs_streqChristian Gromm2020-05-271-6/+6
| | | | | | | | | | This patch replaces function strcmp() with sysfs_streq() to compare strings provided via sysfs. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-11-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: add missing put_device callsChristian Gromm2020-05-271-0/+2
| | | | | | | | | | This patch adds the missing put_device() function calls to properly free allocated resources and maintain reference counts. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-10-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use correct error codesChristian Gromm2020-05-271-3/+3
| | | | | | | | | | This patch uses the -EINVAL return code where -EFAULT is wrongly being used. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-9-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: replace code to calculate array indexChristian Gromm2020-05-271-3/+8
| | | | | | | | | | | | | | This patch removes the expression that makes use of a priori knowledge about channel numbers to calculate an array index. The expression 'peer = 1 - channel' utilizes the fact that an USB interface that operates on the asynchronous data of the Network only has two endpoints. Hence, channel being 0 or 1. The replacement is more simple and less confusing when reading the code. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-8-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: don't use error path to exit function on successChristian Gromm2020-05-271-2/+2
| | | | | | | | | | This patch makes it transparent whether the function is exiting with an error or successful. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: move allocation of URB out of critical sectionChristian Gromm2020-05-271-7/+5
| | | | | | | | | | | | This patch puts the call to usb_alloc_urb() before the critical section starts that is protected with the io_mutex lock. This is to make the section as short as possible and to use the regular GFP_KERNEL flag. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: return 0 instead of variableChristian Gromm2020-05-271-2/+2
| | | | | | | | | | This patch returns 0 instead of variable in case of invalid parameter has been passed to function to increase readability. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: change return value of function drci_rd_regChristian Gromm2020-05-271-5/+7
| | | | | | | | | | | | This patch makes function drci_rd_reg return 0 in case of success and a negative number else. As no caller is evaluating the number of bytes transferred by function usb_control_msg this information is being omitted. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: don't use expressions that might fail in a declarationChristian Gromm2020-05-271-3/+6
| | | | | | | | | | This patch moves function calls that can fail out of the declararion block of a function body. This is done to enhance readability. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: change order of function parametersChristian Gromm2020-05-271-5/+6
| | | | | | | | | | This patch swaps the arguments of function get_stream_frame_size to have the struct device as first parameter. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use macro ATTRIBUTE_GROUPSChristian Gromm2020-05-151-9/+2
| | | | | | | | | | This patch makes use of the macro ATTRIBUTE_GROUPS to create the groups instead of defining them manually. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1589534465-7423-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: fix typo in KconfigChristian Gromm2020-05-151-1/+1
| | | | | | | | | | This patch corrects the typo in the Kconfig file where it says tranceiver instead of transceiver. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/1589534465-7423-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use dev_dbg functionChristian Gromm2020-05-151-11/+11
| | | | | | | | | | This patch replaces the functions dev_notice with dev_dbg to silence the driver during normal operation. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1589534465-7423-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: check number of reported endpointsChristian Gromm2020-05-151-7/+6
| | | | | | | | | | | This patch checks the number of endpoints reported by the USB interface descriptor and throws an error if the number exceeds MAX_NUM_ENDPOINTS. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1589534465-7423-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: remove reference to USB error codesChristian Gromm2020-05-151-97/+0
| | | | | | | | | | This patch removes the reference to the driver API file for USB error codes. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1589534465-7423-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use dev_*() functions to print messagesChristian Gromm2020-05-151-8/+8
| | | | | | | | | This patch removes the pr_*() functions and uses dev_*() instead. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1589534465-7423-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: sanity check channel before using it as an index into arraysColin Ian King2020-05-131-5/+6
| | | | | | | | | | | | Currently channel is being sanity checked after it has been used as an index into some arrays. Fix this by moving the sanity check of channel before the arrays are indexed with it. Addresses-Coverity: ("Negative array index read") Fixes: 59ed0480b950 ("Staging: most: replace pr_*() functions by dev_*()") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200507150652.52238-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: add PM functionsChristian Gromm2020-05-131-0/+28
| | | | | | | | This patch adds the implementation of the PM functions resume and suspend. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1588680892-9413-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: consolidate codeChristian Gromm2020-05-051-4/+2
| | | | | | | | This patch applies the same look and feel when assigning local variables. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1588672829-28883-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: drop unlikely macrosChristian Gromm2020-05-051-5/+5
| | | | | | | | | | This patch removes the unlikely macros in the error patch of argument checking, as it has no measurable performance adavantage. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1588672829-28883-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: use EINVAL error codeChristian Gromm2020-05-051-5/+5
| | | | | | | | | This patch replaces the error code EIO with EINVAL, when there is no IO happening. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1588672829-28883-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: usb: remove overcautious parameter checkingChristian Gromm2020-05-051-8/+3
| | | | | | | | | | The interface pointer passed to a core API function cannot be NULL. This patch removes unnessecary the sanity check of the pointer. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/1588672829-28883-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>