summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2017-11-27staging: ccree: remove MIN/MAX macrosGilad Ben-Yossef3-5/+2
The driver was using open coded MIN/MAX macros to compute fixed defines. Remove them and use bigger value always instead. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: remove unnecessary parenthesesGilad Ben-Yossef5-59/+59
Remove unnecessary parentheses in if statements across the driver. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: alloc by instance not typeGilad Ben-Yossef1-1/+1
Allocation by instance is preferred to allocation by type. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: fix typosGilad Ben-Yossef5-5/+5
Fix a bunch of comment typos. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: remove unused cc_base parameterGilad Ben-Yossef6-18/+12
Remove a common parameter named cc_base with the pointer to the mapped command registers which was used by the old register access macros that are not longer in use. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: remove braces for single statementGilad Ben-Yossef1-4/+2
Remove necessary braces for single statement blocks to improve code readabilty. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: remove compare to none zeroGilad Ben-Yossef9-128/+128
The driver was full of code checking "if (x != 0)". Replace by "if (x)" for better readability. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: remove unneeded castGilad Ben-Yossef1-8/+4
Remove unneeded cast of the return value of dev_get_drvdata() to struct ssi_drvdata * for better readability. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: simplify pm manager using local varGilad Ben-Yossef1-4/+8
Make the code more readable by using a local variable. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: fold common code into functionGilad Ben-Yossef1-52/+37
Fold common code copying MAC to/from a temp. buffer into an inline function instead of keeping multiple open coded versions of same. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: simplify buf mgr using local varsGilad Ben-Yossef1-8/+10
Make the code more readable by using a local variables for commonly use expressions in the buffer manager part of the driver. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: simplify AEAD using local varGilad Ben-Yossef1-6/+4
Make the code more readable by using a local variable for commonly use expression in the AEAD part of the driver. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: ccree: make long func call sites readableGilad Ben-Yossef13-392/+345
The driver was using a function naming scheme including common prefixes for driver global functions based on the code module they came from. The combination of long names with long common prefixes made the whole thing too long for a human to parse. Switch to simple and shorter function naming scheme. Where required, realign parameters and add paranthesis for better code readability. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: lustre: obdclass: simplify cl_lock_fini()NeilBrown1-5/+4
Using list_first_entry_or_null() makes this (slightly) simpler. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: lustre: simplfy lov_finish_set()NeilBrown1-6/+4
When deleting everything from a list, a while loop is cleaner than list_for_each_safe(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: lustre: ldlm: use list_for_each_entry in ldlm_lock.cNeilBrown1-7/+3
This makes some slightly-confusing code a bit clearer, and avoids the need for 'tmp'. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: lustre: ldlm: use list_first_entry in ldlm_lockNeilBrown1-4/+4
This make the code (slightly) more readable. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: usb: fix show/store function namesChristian Gromm1-17/+17
This patch renames the show/store functions of the USB module. It is needed to make the module meet the established naming convention. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: add ABI documentationChristian Gromm1-0/+313
This patchg adds the sysfs-bus-most.txt file to the source tree. It is needed to have an ABI description of the driver's sysfs interface. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: fix list traversingAndrey Shvetsov1-4/+13
This patch fixes the offset and data handling when traversing the list of devices that are attached to the bus. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: remove class generationChristian Gromm1-12/+1
This patch stops the core from generating a module owned class and registering it with the kernel. It is needed, because there is no need for a default MOST class to be present in the kernel. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: bundle module variables in structureChristian Gromm1-45/+43
This patch creates the structure comp to put the module variables for encapsulation purposes. For an improved readability some variables are renamed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: replace function prefixChristian Gromm1-29/+29
This patch replaces the function prefixes aim_* with comp_*. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: update driver usage fileAndrey Shvetsov1-87/+105
This patch keeps the usage file up to date. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: check value returned by match functionChristian Gromm1-0/+4
This patch adds a check for the pointer returned by the function match_component. It is needed to prevent a NULL pointer dereference in case the provided component name does not match any list entry. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: fix data typeChristian Gromm1-1/+1
This patch fixes the type used to manage the channels of an registered MOST interface. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: usb: clear functional stall on OUT endpointChristian Gromm1-0/+15
For the MOST packet channel there are two dedicated USB endpoints. But internally the hardware has actually one channel for data forwarding from and to MOST. To have the hardware clean up its state machine correctly in case of an error, both USB pipes need to be reset. This patch triggers the host to also clear the OUT endpoint's halt condition in case an IN endpoint has signaled to be stalled. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: fix formattingChristian Gromm2-7/+2
This patch fixes coding style violations. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: denote modules as componentsChristian Gromm1-12/+12
Substrings containing 'module' are replaced with 'component' by this patch. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: fix comment sectionsChristian Gromm6-91/+70
This patch updates and corrects the comment sections of the code. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: rename variable cdev_aimChristian Gromm1-9/+9
This patch renames the variable cdev_aim to cdev_comp. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: rename class instance aim_classChristian Gromm1-8/+8
This patch renames the instance aim_class of struct class to comp_class. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: rename variable aim_devnoChristian Gromm1-5/+5
This patch renames the variable aim_devno to comp_devno. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: cdev: rename struct aim_channelChristian Gromm1-19/+19
This patch renames the structure aim_channel to comp_channel. It is needed to complete the process of changing the module designator from AIM to Component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: video: remove aim designatorsChristian Gromm1-76/+76
This patch takes the 'aim' prefixes and variable names off the module and uses component instead. It is needed because userspace interfacing modules are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: sound: remove aim designatorChristian Gromm1-8/+8
This patch removes all 'aim' designators and replaces them with 'comp'. It is needd because userspace interfacing modules are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: net: remove aim designatorsChristian Gromm1-22/+22
This patch renames the all aim designators with comp. It is needed because userspace interfacing modules are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: rename function link_channel_to_aimChristian Gromm1-4/+4
This patch renames the function link_channel_to_aim to link_channel_to_component. It is needed because userspace interfacing modules are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: rename aim variablesChristian Gromm1-85/+87
This patch replaces the 'aim' substrings of variable names with 'comp'. It is needed because of the renaming of AIM modules to components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: rename mod_listChristian Gromm1-5/+5
This patch renames the variable mod_list to comp_list. It is needed because modules that interface userspace are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: rename functions to register a driver with most_coreChristian Gromm6-17/+18
This patch renames the functions to register and deregister a component module with the core. It is needed because the modules that interface the userspace are referred to as components. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: rename struct most_aimChristian Gromm6-33/+31
The designator of a module that proivdes means to interface userspace is called an AIM. Since this name seems to be unappropiate, this kind of moduels are going to be referred to as componetns. This is done because such modules function as components to enhance the core with new features. This patch renames the struct most_aim to core_component. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: usb: remove pointer initializationChristian Gromm1-2/+0
This patch removes the initialization of the priv pointer of the most_interface structure. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: remove context pointerChristian Gromm1-1/+0
This patch removes the unused context pointer that was meant to provide the opportunity to store context information. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: put channel name in struct most_channelChristian Gromm1-7/+6
This patch stores a channel's name inside the most_channel structure. It is needed to have the channel attributes tied together. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: replace struct most_inst_objChristian Gromm2-103/+99
This patch introduces struct interface_private as a replacement for the struct most_inst_obj. This structure holds private data that is only needed by the core module and will be accessed by a pointer from within the most_interface structure. As a result of this replacement the bus helper functions can be used to search for devices. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: rename functionChristian Gromm1-4/+4
The core module used to have two functions to find a certain channel. One by name and one by interface. Since no channel is searched by its interface name anymore the by_name suffix is rendered redundant. This patch renames the function accordingly. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: remove struct deviceChristian Gromm2-18/+0
This patch takes out the struct device of struct most_aim, because it is not needed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: fix sysfs attribute managementChristian Gromm1-36/+73
This patch creates a new attribute group to manage the attributes of a registered aim module in sysfs and changes the show and store functions accordingly. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: track aim modules with linked listChristian Gromm2-2/+5
The core needs to know what modules are registered. This patch makes the core keep track of the registered modules. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>