aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2016-03-28staging: dgnc: fix CamelCase in dgnc_drvier.h andDaeseok Youn2-22/+22
fix checkpatch.pl warning about CamelCase Signed-off-by: Daeseok Youn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: xgifb: remove extra braces from if stmt (single branch)Nicholas Sim1-4/+4
Remove braces from one branch of if statement where both branches only have a single line of code, as suggested in Documentation/CodingStyle Signed-off-by: Nicholas Sim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: xgifb: ensure braces on all arms of if stmtNicholas Sim1-1/+2
Added braces on else arm of if statement where if arm already has braces as suggested for clarity in Documentation/CodingStyle Signed-off-by: Nicholas Sim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: rtl8188eu: remove return at end of void function callNicholas Sim1-17/+0
Remove unnecessary return statements from last lines of void function call (several) Signed-off-by: Nicholas Sim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: vt6656: Fixed multiple logical comparisions warnings in main_usb.cParth Sane1-3/+3
Using comparison to false and true is error prone. Fixed multiple warnings as per checkpatch guidelines. Signed-off-by: Parth Sane <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28Staging: wlan-ng: wiphy_free() is not called in case wiphy_register() failsClaudiu Beznea1-1/+3
This patch covers wiphy_register() failures in wlan_create_wiphy() from cfg80211.c by calling wiphy_free() for the correspondent struct wiphy allocated structure. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: dgnc: fix CamelCase in dgnc_driver.cDaeseok Youn4-44/+44
fix checkpatch.pl warning about CamelCase. Signed-off-by: Daeseok Youn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28Staging: iio: Fix sparse endian warningKsenija Stanojevic1-2/+3
Fix following sparse warning: warning: cast to restricted __be16 Signed-off-by: Ksenija Stanojevic <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28Staging: most: Remove __cplusplus check in header filesPrasannaKumar Muralidharan3-24/+0
Remove unnecessary __cplusplus check in header files as it is not required. Signed-off-by: PrasannaKumar Muralidharan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: speakup: fix type mismatch warningsOkash Khawaja1-1/+2
Compiling speakup driver with sparse produces following warning: drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in initializer (different base types) drivers/staging/speakup/serialio.c:22:9: expected unsigned int [unsigned] flags drivers/staging/speakup/serialio.c:22:9: got restricted upf_t This patch fixes it. Signed-off-by: Okash Khawaja <[email protected]> Acked-by: Samuel Thibault <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()H Hartley Sweeten1-25/+35
This function calls some helper functions to convert the counter variant specific clock select bits into the generic enum ni_gpct_clock_source_bits equivelent. These helper functions currently BUG() if the clock select bits are invalid. It then calls ni_tio_clock_period_ps() to figure out the clock period based on the generic clock source. This function could also BUG() if the prescale bits are invalid. In reality this should never happen but refactor the code to return -EINVAL instead and remove the BUG() checks. These functions are also called by ni_tio_set_sync_mode(). When this function is called by ni_tio_set_clock_src() the counter select bits have already been validated. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()H Hartley Sweeten1-2/+1
This BUG() can never happen. The previous ni_tio_has_gate2_registers() check will have already caused the function to return -EINVAL. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: fix ni_tio_insn_config()H Hartley Sweeten1-13/+20
The (*insn_config) functions are supposed to return an errno or the number of 'data' values used for the instruction (insn->n). Currently this function returns an errno or 0. Fix the function to work like the core expects. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src()H Hartley Sweeten1-49/+97
This function calls some helper functions to convert the counter variant specific gate select bits into the generic enum ni_gpct_clock_source_bits equivelent. These helper functions currently BUG() if the gate select bits are invalid. This should never happen but refactor the code to return -EINVAL instead and remove the BUG() checks. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: validate clock sourceH Hartley Sweeten1-15/+19
Refactor the functions that determine the clock source bits so that they return -EINVAL if the clock source is invalid. Pass the errno back to ni_tio_insn_config(). Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tiocmd: remove BUG() which can never occurH Hartley Sweeten1-3/+0
All the counter_dev->variant options are handled by the switch. Remove the BUG() which can never occur. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tiocmd: remove unsed param from ↵H Hartley Sweeten1-10/+3
ni_tio_acknowledge_and_confirm() The 'stale_data' pointer is always NULL. Just remove it. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tiocmd: fix block commentsH Hartley Sweeten1-29/+31
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tiocmd: Prefer 'unsigned int' to bare use of 'unsigned'H Hartley Sweeten1-11/+11
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_arm()H Hartley Sweeten1-44/+34
Make this function a bit more consise by absorbing the GI_HW_ARM_SEL_MASK() inline helper and combine the two switch (start_trigger) code paths. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_set_sync_mode()H Hartley Sweeten1-35/+30
The 'force_alt_sync' paramater is always 0. Remove it. Absorb the GI_ALT_SYNC() inline helper and use some local variables to clarify this function. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_get_gate_src()H Hartley Sweeten1-17/+15
Clarify the code a bit by handling the NI_GPCT_DISABLED_GATE_SELECT source in the common code path. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: fix block commentsH Hartley Sweeten1-20/+16
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: Prefer kernel type 'u64' over 'uint64_t'H Hartley Sweeten1-6/+6
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: Prefer 'unsigned int' to bare use of 'unsigned'H Hartley Sweeten1-83/+83
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio.h: remove unnecessary forward declarationsH Hartley Sweeten1-4/+0
These struct forward declarations are not needed. Remove them. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio.h: fix block commentH Hartley Sweeten1-15/+14
Fix the checkpatch.pl issue: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio.h: tidy up struct ni_gpctH Hartley Sweeten1-4/+4
Fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: Prefer kernel type 'u64' over 'uint64_t' CHECK: spinlock_t definition without comment Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio.h: tidy up struct ni_gpct_deviceH Hartley Sweeten1-3/+3
Fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: spinlock_t definition without comment Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: tidy up struct ni_gpct_device (*{write, read}_register)H Hartley Sweeten2-21/+20
For aesthetics, rename these callbacks to simply read/write. Change the 'unsigned' parameters to 'unsigned int'. This fixes a number of checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio_internal: export {read, write)_register()H Hartley Sweeten3-41/+56
Move these inline functions out of the header and export them instead. These functions have pretty generic names, rename them. Fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio_internal: simplify ↵H Hartley Sweeten2-15/+5
ni_tio_counting_mode_registers_present() Only the e series gpct variant does not have counting mode registers. Simplfy this function. For aesthetics, return bool instead of int. This fixes the checkpatch.pl issues: CHECK: spaces preferred around that '*' (ctx:ExV) CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: export and fix ni_tio_set_bits()H Hartley Sweeten2-33/+39
Move the inline function from the header and export it instead. Fix the checkpatch.pl issue: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' The 'unsigned' vars can safely be changed to 'unsigned int'. This allows moving ni_tio_set_bits_transient() into the driver and making it static. Fix the checkpatch.pl issue: CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() The BUG_ON() is overkill. All the drivers that call this function pass 'register_index' values that are valid. Just check the 'register_index' before updating the software copy and writing the register. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: export and fix ni_tio_get_soft_copy()H Hartley Sweeten2-19/+27
Move the inline function from the header and export it instead. For the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() The 'unsigned' vars can safely be changed to 'unsigned int'. The BUG_ON() is overkill. All the drivers that call this function pass 'register_index' values that are valid. Just check the 'register_index' and return 0 if it's not valid. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: fix ni_tio_arm() params/varsH Hartley Sweeten3-12/+12
As suggested by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' The 'arm' parameter is really a true/false flag. For aesthetics, change it to a bool. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: fix ni_tio_set_gate_src() params/varsH Hartley Sweeten2-16/+15
As suggested by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio_internal.h: fix block comment issuesH Hartley Sweeten1-21/+22
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio_internal.h: tidy up bit definesH Hartley Sweeten1-97/+102
Fix the checkpatch.pl issues: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: plx9052.h: fix block comment issuesH Hartley Sweeten1-18/+17
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: plx9052.h: tidy up bit definesH Hartley Sweeten1-43/+44
Fix the checkpatch.pl issues: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: z8536: tidy up bit definesH Hartley Sweeten1-41/+48
Fix the checkpatch.pl issues: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_mio_common: ni_gpct_device_destroy() can handle a NULL ↵H Hartley Sweeten1-4/+2
pointer Remove the unnecessary NULL pointer check. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_tio: make ni_gpct_device_destroy() NULL pointer safeH Hartley Sweeten1-1/+1
Modify the pointer check to make this function NULL pointer safe. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc.h: fix block comment issuesH Hartley Sweeten1-16/+14
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc_pci: tidy up bit defineH Hartley Sweeten1-2/+2
As suggested by checkpatch.pl: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc_cs: fix block comment issuesH Hartley Sweeten1-51/+44
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc_common: tidy up block commentsH Hartley Sweeten1-22/+37
Fix the checkpatch.pl issues: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc_regs.h: tidy up bit definesH Hartley Sweeten1-41/+41
As suggested by checkpatch.pl: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: ni_labpc: remove some unnecessary definesH Hartley Sweeten2-6/+3
The EEPROM_SIZE and NUM_AO_CHAN defines are only used once and they don't add any significant clarity to the driver. They are also pretty generic symbol names. Remove them and just open code the values. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: comedi: dt282x: remove unnecessary commentH Hartley Sweeten1-14/+0
The "Configuration options" are documented in the comedi driver comment block. Remove the redundant comment before the drivers (*attach) function. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>