Commit Graph

535485 Commits

Author SHA1 Message Date
Joe Perches b239904d8f staging: octeon: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Joe Perches a5ee4695ec staging: rtl8712: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Joe Perches e075de6109 staging: xgifb: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Ioan-Adrian Ratiu f157d807b9 staging: lustre: ptlrpc: add missing include directive
Without including ptlrpc_internal.h, GCC gives prototype warnings
"pack_generic.c:642:5: warning: no previous prototype for ..."
and sparse also complains "pack_generic.c:642:5: warning: symbol
'lustre_unpack_req_ptlrpc_body' was not declared. ..."

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:18 -07:00
Swee Hua Law 94a99b4611 staging: lustre: Do not init global to NULL
Remove "= NULL" in global variable

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:48:34 -07:00
Joe Perches 8150a97fdd staging: lustre: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:48:34 -07:00
Swee Hua Law 049fbd9fcc staging: lustre: checkpatch: argument alignment for readability
Fix checkpatch problem: move last argument of the hlist..() back to same line

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:47:41 -07:00
Swee Hua Law aa62a8415e staging: lustre: checkpatch: move */ block comment to next line
Fix checkpatch problem: move */ from end of line to new line

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:47:41 -07:00
Swee Hua Law bcffa060c1 staging: lustre: checkpatch: symbol == NULL should be !symbol
Fix checkpatch problem: change == NULL comparison to !symbol

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:47:41 -07:00
Swee Hua Law 1b680a8181 staging: lustre: checkpatch: do not init global to NULL
Fix checkpatch problem: remove NULL assignment fro global variable

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:47:41 -07:00
Patrick Boettcher a836582655 staging: lustre-libcfs: make static-variable constant
This static can be made constant as it is never modified.

Found during sparse-cleanup.

Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:46:02 -07:00
Patrick Boettcher 25bbe418f8 staging: lustre-libcfs: fix sparse warning
Fix sparse warnings of the following type:

warning: symbol '....' was not declared. Should it be static?

Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:46:02 -07:00
Shraddha Barke 0df4e3e9bb Staging: unisys: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Shraddha Barke 94858fecca Staging: lustre: libcfs: Remove unnecessary cast on void*
This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (void *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Shraddha Barke 642ac6c0dc Staging: wilc1000: Remove null check before kfree
kfree on NULL pointer is a no-op.

This patch uses the following semantic patch to find such an instance
where NULL check is present before kfree.

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Jacob Kiefer 772a6e1fff staging: rtl8723au: Fix Sparse errors in rtw_security.c
This patch fixes the following sparse errors:

  CHECK   drivers/staging/rtl8723au/core/rtw_security.c
drivers/staging/rtl8723au/core/rtw_security.c:189:39: \
  warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_security.c:189:39:    \
  expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:189:39:    \
  got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:197:39: \
  warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_security.c:197:39:    \
  expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:197:39:    \
  got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:682:39: \
  warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_security.c:682:39:    \
  expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:682:39:    \
  got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:694:39: \
  warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_security.c:694:39:    \
  expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_security.c:694:39:    \
  got restricted __le32 [usertype] <noident>

Signed-off-by: Jacob Kiefer <jtk54@cornell.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Chaehyun Lim 071c19e73b staging: wilc1000: remove wilc_strutils.c and wilc_strutils.h
Remove wilc_strutils.c and wilc_strutils.h that are not needed.
wilc_strutils.o is also removed in Makefile.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 9504f96492 staging: wilc1000: remove WILC_memcpy_INTERNAL
Remove WILC_memcpy_INTERNAL that is used in the WILC_memcpy
because WILC_memcpy is replaced by memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim f78d5f809e staging: wilc1000: remove WILC_memcpy function
Remove WILC_memcpy function that is changed to memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim d00d2ba333 staging: wilc1000: use memcpy instead of WILC_memcpy
Use memcpy instead of WILC_memcpy that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 31126a478f staging: wilc1000: remove WILC_strncmp function
Remove WILC_strncmp function that is changed to strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 3f882895c7 staging: wilc1000: use strncmp instead of WILC_strncmp
Use strncmp instead of WILC_strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 24e326ea29 staging: wilc1000: remove WILC_strncpy function
Remove WILC_strncpy function that is changed to strncpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 85b509f18a staging: wilc1000: Use strncpy instead of WILC_strncpy
Use strncpy instead of WILC_strncpy that is a custom function

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 1799cb6188 staging: wilc1000: remove WILC_strlen function
Remove WILC_strlen function that is changed to strlen.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim ff96dfb5b1 staging: wilc1000: use strlen instead of WILC_strlen
Use strlen instead of WILC_strlen that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 7d2b212f88 staging: wilc1000: remove commented code
Remove commented code that is not used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Dan Carpenter 358d577ce1 staging: comedi: me4000: use bitwise AND instead of logical
This was supposed to bitwise AND but there is a typo.

Fixes: 1a02387063 ('staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:37:58 -07:00
Ian Abbott ad83dbd974 staging: comedi: adl_pci7x3x: fix digital output on PCI-7230
The "adl_pci7x3x" driver replaced the "adl_pci7230" and "adl_pci7432"
drivers in commits 8f567c373c ("staging: comedi: new adl_pci7x3x
driver") and 657f77d173 ("staging: comedi: remove adl_pci7230 and
adl_pci7432 drivers").  Although the new driver code agrees with the
user manuals for the respective boards, digital outputs stopped working
on the PCI-7230.  This has 16 digital output channels and the previous
adl_pci7230 driver shifted the 16 bit output state left by 16 bits
before writing to the hardware register.  The new adl_pci7x3x driver
doesn't do that.  Fix it in `adl_pci7x3x_do_insn_bits()` by checking
for the special case of the subdevice having only 16 channels and
duplicating the 16 bit output state into both halves of the 32-bit
register.  That should work both for what the board actually does and
for what the user manual says it should do.

Fixes: 8f567c373c ("staging: comedi: new adl_pci7x3x driver")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.13+, needs backporting for 3.7 to 3.12
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:37:58 -07:00
H Hartley Sweeten 1c38d03ea9 staging: comedi: hwdrv_apci3501: remove "magic" numbers in apci3501_read_insn_timer()
Use register bit defines from addi_tcw.h to remove the "magic" numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:18 -07:00
H Hartley Sweeten 0d5e03079d staging: comedi: hwdrv_apci3501: remove "magic" numbers in apci3501_write_insn_timer()
Use register bit defines from addi_tcw.h to remove the "magic" numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:18 -07:00
H Hartley Sweeten 7dc68e3504 staging: comedi: hwdrv_apci3501: remove "magic" numbers in apci3501_config_insn_timer()
Use register bit defines from addi_tcw.h to remove the "magic" numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:18 -07:00
H Hartley Sweeten 020e05e74d staging: comedi: addi_apci_3501: remove "magic" numbers in apci3501_interrupt()
Use register bit defines from addi_tcw.h to remove the "magic" numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:18 -07:00
H Hartley Sweeten cd5d0ae481 staging: comedi: addi_apci_3501: use addi_tcw.h for the timer registers
The APCI3501_TIMER_* register defines in this driver are that same as
the ADDI_TCW_* defines with an additional offset.

Add a 'tcw' (timer/counter/watchdog) member to the private data to
hold the address for the iobase of the registers. Use that and the
defines from addi_tcw.h to address the registers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten f821bf57a4 staging: comedi: addi_apci_3501: rename CamelCase vars in apci3501_interrupt()
Rename the CamelCase local variables.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten 63316aae91 staging: comedi: addi_apci_3501: prefer using the BIT macro
Change the register bit defines to use the BIT macro.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten cd07fbf27b staging: comedi: addi_apci_3501: rename private data 'i_IobaseAmcc'
Rename this CamelCase member of the private data.

Also, fix the type of the member, it holds a pci_resource_start()
address and should be an unsigned long.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten c85c26b8d0 staging: comedi: hwdrv_apci3501: refactor apci3501_config_insn_timer()
The handling for the watchdog and timer modes is very similar. Refactor
this function to use a common code path for both modes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten bde879ae6e staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in apci3501_config_insn_timer()
Rename this CamelCase local variable.

For aesthetics, split the mask/set operations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten f7f909e09f staging: comedi: hwdrv_apci3501: refactor apci3501_read_insn_timer()
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical.
Refactor this function to use a common code path for both timer modes.

Remove the incorrect dev_err() noise. The subdevice is valid but the
timer_mode is not supported.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten 626bb280d0 staging: comedi: hwdrv_apci3501: refactor apci3501_write_insn_timer()
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical
except for the "stop" operation. Refactor this function to use a common
code path for both timer modes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten e078d25639 staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in apci3501_write_insn_timer()
Rename this CamelCase local variable.

For aesthetics, split the mask/set operations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten 4434a99eaa staging: comedi: addi_apci_3501: rename private data 'b_TimerSelectMode'
Rename this CamelCase member of the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:17 -07:00
H Hartley Sweeten a66f2017ec staging: comedi: hwdrv_apci3501: remove useless read/mask to stop watchdog
The watchdog is stopped in apci3501_write_insn_timer() by writing a 0 to
the timer control register. There is no need to read the register first
and mask it (as done when the timer is used as a timer).

Reported-by: coverity (CID 1227052)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:36:16 -07:00
H Hartley Sweeten 2be8ae5898 staging: comedi: comedi_fops: absorb comedi_free_board_minor()
This function is only called by comedi_cleanup_board_minors() and the
'minor' parameter will always be < COMEDI_NUM_BOARD_MINORS.

For aesthetics, absorb the function and remove the unnecessary BUG_ON().

Split the comedi_clear_board_minor() out to clarify that the return value
is a comedi_device pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:35:49 -07:00
H Hartley Sweeten c4237a2b59 staging: comedi: comedi_fops: remove BUG_ON() in comedi_dev_get_from_board_minor()
This function is only called by comedi_dev_get_from_minor() and the 'minor'
value will always be < COMEDI_NUM_BOARD_MINORS. Remove the unnecessary
BUG_ON().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:35:49 -07:00
H Hartley Sweeten 5104a89887 staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()
Drivers should not crash the kernel.

This function is only called by comedi_device_detach_cleanup() and the
s->minor will always be valid or the device wouldn't have attached in
the first place.

Leave the checks for safety in accessing the comedi_subdevice_minor_table
array but remove the BUG_ON() calls.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:35:49 -07:00
H Hartley Sweeten 6b3703f4cb staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()
The BUG_ON() checks in this function are not necessary.

comedi_cleanup_board_minors() clears all the entries in the
comedi_board_minor_table array and will call comedi_device_cleanup()
for all attached devices. comedi_device_cleanup() will then
clear the entries in the comedi_subdevice_minor_table array with
comedi_free_subdevice_minor().

Remove the BUG_ON(), drivers should not crash the kernel.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:35:49 -07:00
H Hartley Sweeten 0bb6419ccf staging: comedi: comedi_fops: remove remaining BUG_ON() checks
The BUG_ON() checks in comedi_subdevice_from_minor() and
comedi_dev_get_from_subdevice_minor() are not necessary.

The 'minor' numbers for a given comedi driver are setup by
comedi_dev_get_from_subdevice_minor() and will always be in
the correct range.

Drivers should not crash the kernel, remove the BUG_ON() checks.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:35:49 -07:00
H Hartley Sweeten 5babc1bc4d staging: comedi: hwdrv_apci1564: remove magic numbers in apci1564_counter_insn_read()
Use the bit defines from addi_tcw.h to remove the magic numbers in this
function.

Add the missing define for ADDI_TCW_STATUS_HARDWARE_TRIG.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:34:57 -07:00