Sara Bird [Mon, 20 May 2013 19:28:07 +0000 (15:28 -0400)]
staging/frontier: Fixed up incorrect formatted comments
The existing comments are using an odd style. Fixed them up to adhereto the
StyleGuide. No code changes.
Signed-off-by: Sara Bird <sara.bird.iar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sara Bird [Mon, 20 May 2013 19:18:14 +0000 (15:18 -0400)]
staging/zsmalloc: Fixed up incorrect formatted comments
The existing comments are using an odd style. Fixed them up to adhere
to the StyleGuide. No code changes.
Signed-off-by: Sara Bird <sara.bird.iar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sara Bird [Mon, 20 May 2013 19:14:42 +0000 (15:14 -0400)]
staging/asus_oled: Fixed up incorrect formatted comments.
The existing comments are using an odd style. Fixed them up to adhere
to the StyleGuide. No code changes.
Signed-off-by: Sara Bird <sara.bird.iar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marlies Ruck [Thu, 16 May 2013 18:30:39 +0000 (14:30 -0400)]
Staging: Fixes string split across lines in zram
Fixes the following checkpatch warning in zram_drv.c:
WARNING: quoted string split across lines
Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marlies Ruck [Wed, 15 May 2013 17:05:24 +0000 (13:05 -0400)]
staging: Fix lines over 80 chars in android sw_sync
Fixes the following checkpatch warning:
WARNING: Line over 80 characters
Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marlies Ruck [Wed, 15 May 2013 20:56:49 +0000 (16:56 -0400)]
Staging: Fixes string split across lines in zsmalloc zsmalloc-main
Fixes the following checkpatch warning:
WARNING: quoted string split across lines
Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Fri, 17 May 2013 21:51:58 +0000 (23:51 +0200)]
staging/btmtk_usb: Mark local functions as static
sparse complains about some local functions not being static:
drivers/staging/btmtk_usb/btmtk_usb.c:50:6:
warning: symbol 'hex_dump' was not declared. Should it be static?
drivers/staging/btmtk_usb/btmtk_usb.c:227:5:
warning: symbol 'checksume16' was not declared. Should it be static?
-> add the static keyword
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Fri, 17 May 2013 21:51:57 +0000 (23:51 +0200)]
staging/btmtk_usb: use module_usb_driver to register driver
Removing some boilerplate by using module_usb_driver instead of calling
register and unregister in the otherwise empty init/exit functions
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:06:49 +0000 (01:06 -0700)]
keucr: fixes line over 80 characters warning
This patch fixes the following checkpatch warning,
WARNING: line over 80 characters
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:06:36 +0000 (01:06 -0700)]
keucr: fixes trailing whitespace error
This patch fixes the following checkpatch error,
ERROR: trailing whitespace
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:06:19 +0000 (01:06 -0700)]
keucr: fixes no spaces at the start of a line warning
This patch fixes the following checkpatch warning,
WARNING: please, no spaces at the start of a line
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:06:05 +0000 (01:06 -0700)]
keucr: fixes do not use C99 // comments error
This patch fixes the following checkpatch error,
ERROR: do not use C99 // comments
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:05:51 +0000 (01:05 -0700)]
keucr: removes unused code from smilmain.c
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:05:04 +0000 (01:05 -0700)]
keucr: fixes space prohibited before warning
This patch fixes the following checkpatch error and warning,
ERROR: space prohibited before open square bracket '['
WARNING: space prohibited before semicolon
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:04:49 +0000 (01:04 -0700)]
keucr: fixed space prohibited between warning
This patch fixes the following checkpatch warning,
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:04:33 +0000 (01:04 -0700)]
keurc: fixes spaces required around error
This patch fixes the following checkpatch error,
ERROR: spaces required around that ' '
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:04:18 +0000 (01:04 -0700)]
keucr: fixes space required before open parenthesis error
This patch fixes the following checkpatch error,
ERROR: space required before the open parenthesis '('
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:04:02 +0000 (01:04 -0700)]
keucr: fixes space required after error
This patch fixes the following checkpatch error,
ERROR: space required after that ' '
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:03:41 +0000 (01:03 -0700)]
keucr: fixes open brace go on the next line error
This patch fixes the following checkpatch error,
ERROR: open brace '{' following function declarations go on the next
line
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:03:15 +0000 (01:03 -0700)]
keucr: fixes else should follow close brace error
This patch fixes the following checkpatch error,
ERROR: else should follow close brace '}'
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:02:50 +0000 (01:02 -0700)]
keucr: fixes open brace should be on the previous line error
This patch fixes the following checkpatch error,
ERROR: that open brace { should be on the previous line
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amarjargal Gundjalam [Fri, 17 May 2013 08:02:22 +0000 (01:02 -0700)]
keucr: Fixes return is not a function error in smilmain.c
Fixes the following checkpatch error,
ERROR: return is not a function, parentheses are not required
Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katja Collier [Fri, 17 May 2013 13:37:06 +0000 (15:37 +0200)]
staging: fixed else format in ft1000_debug.c
Put else statements on same line as if statement close bracket in
"/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c".
Signed-off-by: Katja Collier <katjacollier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katja Collier [Fri, 17 May 2013 13:38:35 +0000 (15:38 +0200)]
staging: fixed spaces around parens in ft1000
Deleted extra spaces before and after parens, added a couple necessary
spaces before parens in
"/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c" and
"/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h".
Signed-off-by: Katja Collier <katjacollier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katja Collier [Fri, 17 May 2013 13:36:03 +0000 (15:36 +0200)]
staging: open braces in ft1000_debug.c and ioctl.h
Fixed open braces error in "/staging/ft1000/ft1000-usb/ft1000_ioctl.h"
and "/staging/ft1000/ft1000-usb/ft1000_debug.c" by moving braces to the
correct line.
Signed-off-by: Katja Collier <katjacollier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katja Collier [Fri, 17 May 2013 13:35:08 +0000 (15:35 +0200)]
staging: improved comment style in ft1000_ioctl.h
Replaced C99 style comments with C89 in
"/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h".
Signed-off-by: Katja Collier <katjacollier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katja Collier [Fri, 17 May 2013 13:34:14 +0000 (15:34 +0200)]
staging: improved comment style in ft1000_debug.c
Replaced C99 style comments with C89 in
"/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c".
Signed-off-by: Katja Collier <katjacollier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Fri, 17 May 2013 22:19:54 +0000 (00:19 +0200)]
staging/xgifb: Remove dead assignments/increments
The code now contains several dead assignments which are shadowed by
another assignment a few lines later.
-> This patch removes them (and possibly associated code).
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Fri, 17 May 2013 08:27:05 +0000 (16:27 +0800)]
staging: lustre: fix to use list_for_each_entry_safe() when delete items
Since we will remove items off the list using list_del_init() we need
to use a safe version of the list_for_each_entry() macro aptly named
list_for_each_entry_safe().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Fri, 17 May 2013 08:43:15 +0000 (16:43 +0800)]
staging: wlags49_h2: fix error return code in wl_adapter_insert()
When return from wl_adapter_insert() in the register_netdev() error
handling case, 'ret' which is 0 is returned, but we should return a
negative error code instead, so fix to return the return value of
register_netdev().
Introduce by commit
657d4c86d4cd85a4696445f6fb2fe0941a5724ff
(staging: wlags49_h2: fix error handling in pcmcia probe function)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hema Prathaban [Fri, 17 May 2013 05:44:56 +0000 (11:14 +0530)]
staging: vt6655: Use alloc_etherdev() for kzalloc
Use alloc_etherdev() for kzalloc
Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lisa Nguyen [Fri, 17 May 2013 17:27:49 +0000 (10:27 -0700)]
staging/speakup: Remove trailing whitespace in Kconfig
Removed trailing whitespace in Kconfig to meet kernel
documentation standards.
Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lisa Nguyen [Fri, 17 May 2013 18:52:28 +0000 (11:52 -0700)]
staging/speakup: Replaced deprecated function
Replaced simple_strtol() function with kstrtol() function
in main.c
Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lisa Nguyen [Fri, 17 May 2013 18:51:18 +0000 (11:51 -0700)]
staging/speakup: Reformatted pointer variables
Reformatted pointer variables in main.c to meet kernel coding
standards.
Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:18:01 +0000 (11:18 -0700)]
staging: comedi: ni_pcidio: use comedi_load_firmware()
Use comedi_load_firmware() instead of duplicating the code in a
private function.
This driver loads multiple firmware images to the device. Modify
comedi_load_firmware() to take a 'context' that is passed to the
firmware upload callback function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:17:40 +0000 (11:17 -0700)]
staging: comedi: me_daq: use comedi_load_firmware()
Use comedi_load_firmware() instead of duplicating the code in a
private function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:17:22 +0000 (11:17 -0700)]
staging: comedi: daqboard2000: use comedi_load_firmware()
Use comedi_load_firmware() instead of duplicating the code in a
private function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:17:00 +0000 (11:17 -0700)]
staging: comedi: drivers: generalize comedi_load_firmware()
Move comedi_load_firmware() from jr3_pci.c to drivers.c and export
it for general use by the comedi drivers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:16:39 +0000 (11:16 -0700)]
staging: comedi: jr3_pci: tidy up comedi_load_firmware()
Refactor the function to remove some unnecessary indents and make
it a bit more concise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 17 May 2013 18:16:12 +0000 (11:16 -0700)]
staging: comedi: jr3_pci: use kasprintf
kasprintf combines kmalloc and sprintf, and takes care of the size
calculation itself.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Fri, 17 May 2013 17:38:25 +0000 (20:38 +0300)]
staging: ozwpan: fix access byteorder for wMaxPacketSize in ozhcd.c
This patch fixes the access byteorder of wMaxPacketSize
which is __le16, following the USB standard, and needs to
be converted into native cpu byteorder in order to be accessed.
Instead of using le16_to_cpu(hep->desc.wMaxPacketSize),
it was used the usb_endpoint_maxp() function, defined in
<uapi/linux/usb/ch9.h>
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 14 May 2013 00:07:28 +0000 (03:07 +0300)]
rtl8192u: remove whitespace after '(' and before ')' in r8192U_dm.c
This patch fixes the following checkpatch errors, in r8192U_dm.c:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 14 May 2013 00:07:26 +0000 (03:07 +0300)]
rtl8192u: remove whitespace after '(' and before ')' in r8192U.h
This patch fixes the following checkpatch errors:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 14 May 2013 00:07:25 +0000 (03:07 +0300)]
rtl8192u: remove whitespace after '(' and before ')' in r8190_rtl8256.c
This patch fixes the following checkpatch errors, in r8190_rtl8256.c:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 20:36:39 +0000 (23:36 +0300)]
rtl8192u: fix whitespace around ~ in r8192U_dm.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 20:36:38 +0000 (23:36 +0300)]
rtl8192u: fix whitespace around ~ in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 20:36:37 +0000 (23:36 +0300)]
rtl8192u: fix whitespace around ~ in r8180_93cx6.c
This patch fixes the whitespace around ~ and corrects the
following checkpatch error:
ERROR: space prohibited after that '~'
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 17:15:56 +0000 (20:15 +0300)]
rtl8192u: fix whitespace around if statements in r819xU_firmware.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 17:15:55 +0000 (20:15 +0300)]
rtl8192u: fix whitespace around if statements in r819xU_cmdpkt.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 17:15:51 +0000 (20:15 +0300)]
rtl8192u: fix whitespace around if statements in r8192U.h
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Mon, 13 May 2013 17:15:49 +0000 (20:15 +0300)]
rtl8192u: fix whitespace around if statements in r8180_93cx6.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Ufimtseva [Thu, 16 May 2013 16:47:07 +0000 (12:47 -0400)]
Staging:
ced1401: Patch removes unused typedefs.
Patch removes unused typedefs BOOLEAN, *LPCSTR, *LPCSTR, UCHAR, *LPBYTE.
Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Ufimtseva [Thu, 16 May 2013 16:47:06 +0000 (12:47 -0400)]
Staging:
ced1401: Patch removes typedef unsigned int DWORD.
Patch removes usage of typedef unsigned int DWORD.
Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Ufimtseva [Thu, 16 May 2013 16:47:05 +0000 (12:47 -0400)]
Staging:
ced1401: Patch removes typedef unsigned short WORD.
Patch removes the use of typedef unsigned short WORD.
Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:36:11 +0000 (14:36 -0700)]
staging: comedi: dt9812: do not allow attaching to unsupported devices
The DT9812 is part of the ECONseries of USB Data Acquisition Modules.
This driver only supports the DT9812-10V and DT9812-2.5V versions of
the module. Do not attach to the device if an unsupported module is
detected.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:35:47 +0000 (14:35 -0700)]
staging: comedi: dt9812: default the analog input gain to 1
The 'default' case should never happen. In case it does, default the
gain to '1'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:35:24 +0000 (14:35 -0700)]
staging: comedi: dt9812: usb_bulk_msg() timeout is in milliseconds
The timeout values passed to usb_bulk_msg() should be in milliseconds
not jiffies.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:35:00 +0000 (14:35 -0700)]
staging: comedi: dt9812: remove some #if 0'ed out code
The struct dt9812_usb_cmd definition contains some #if 0'ed
out code that would cause build errors if enabled. Just remove
it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:34:36 +0000 (14:34 -0700)]
staging: comedi: dt9812: use dev->class_dev for all dev_{level} messages
For consistency in the driver, use dev->class_dev for the device in
all the dev_{level} messages.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:34:12 +0000 (14:34 -0700)]
staging: comedi: dt9812: remove pr_fmt()
There are no pr_{level} messages in this driver. Remove the pr_fmt().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:33:53 +0000 (14:33 -0700)]
staging: comedi: dt9812: cleanup analog out subdevice (*insn_write)
For aesthetic reasons, rename the function to help with grepping and
rename some of the local vars.
The dt9812_analog_out() function can fail. Make sure to check for any
failure and return the errno.
The comedi core expects the (*insn_write) functions to return either
an errno or the number of samples written. Change the final return to
insn->n to make this clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:33:30 +0000 (14:33 -0700)]
staging: comedi: dt9812: cleanup analog out subdevice (*insn_read)
For aesthetic reasons, rename the function to help with grepping and
rename some of the local vars.
This function returns the current analog output value for the channel
that is cached in the private data. Absorb dt9812_analog_out_shadow()
into this function to make it more concise.
The comedi core expects the (*insn_read) functions to return either
an errno or the number of samples read. Change the final return to
insn->n to make this clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:33:09 +0000 (14:33 -0700)]
staging: comedi: dt9812: cleanup analog in subdevice (*insn_read)
For aesthetic reasons, rename the function to help with grepping and
rename some of the local vars.
dt9812_analog_in() can fail. Make sure to check for any failure and
return the errno.
The comedi core expects the (*insn_read) functions to return either
an errno or the number of samples read. Change the final return to
insn->n to make this clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:32:42 +0000 (14:32 -0700)]
staging: comedi: dt9812: convert digital out subdevice to (*insn_bits)
Currently the (*insn_write) function for the digital output subdevice
only sets the state for a single channel. It's more efficent to use
the (*insn_bits) function and allow setting the state for all the
channels.
The comedi core can use the (*insn_bits) to emulate the (*insn_write)
if needed.
Also, use the subdevice 'state' variable to hold the current state
of the channels instead of 'do_shadow' in the private data.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:32:17 +0000 (14:32 -0700)]
staging: comedi: dt9812: convert digital in subdevice to (*insn_bits)
Currently the (*insn_read) function for the digital input subdevice
returns the state for a single channel. It's more efficent to use
the (*insn_bits) function and return the state for all the channels.
The comedi core can use the (*insn_bits) to emulate the (*insn_read)
if needed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:30:59 +0000 (14:30 -0700)]
staging: comedi: dt9812: remove unused variables from private data
The vendor, product, and serial numbers read from the usb device
are only used for a dev_info() message about the device after it
is reset. Reading these values might not be required for the usb
device to function.
For now just remove the variables from the private data and just
use local variables.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:30:20 +0000 (14:30 -0700)]
staging: comedi: dt9812: convert to use comedi (*auto_attach)
Converting this driver to use the comedi (*auto_attach) mechanism
allows pushing the usb (*probe) into the comedi (*auto_attach) and
the usb (disconnect) into the comedi (*detach). This removes the
disconnect between the usb driver and the comedi driver. Now when
the comedi driver is attached it will always have a usb device
associated with it.
This removes the 16 usb device limitation and allows bringing all
the private data into a single struct that can be kzalloc'ed when
the comedi driver is (*auto_attached). It also allows removing the
the sanity checks that make sure a usb device is connected to the
comedi device in the helper functions.
For aesthetic reasons, add some whitespace to the subdevice init.
Also, fix the analog out subdevice. There are 2 analog output
channels available on the usb device.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:29:40 +0000 (14:29 -0700)]
staging: comedi: dt9812: factor the device reset out of dt9812_probe()
When this driver is converted to the comedi (*auto_attach) mechanism
the device reset will be done during the (*auto_attach). To make the
conversion cleaner, factor the device reset out of the (*probe).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:29:14 +0000 (14:29 -0700)]
staging: comedi: dt9812: factor the endpoint setup out of dt9812_probe()
When this driver is converted to the comedi (*auto_attach) mechanism the
endpoint setup will be done during the (*auto_attach). To make the
conversion cleaner, factor the endpoint setup out of the (*probe).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:28:51 +0000 (14:28 -0700)]
staging: comedi: dt9812: remove 'interface' from usb private data
The usb_interface * is only used in the usb (*probe) and (*disconnect).
Remove the pointer to the 'interface' in the usb private data.
For aesthetic reasons, rename the variable 'interface' to simply
'intf' in the (*probe) and (*disconnect).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:28:26 +0000 (14:28 -0700)]
staging: comedi: dt9812: move shadow values to private data
The analog and digital out shadow values are only used by the
comedi_device. Move the variables from the usb private data to
the comedi private data. Also, rename them to something a bit
shorter.
Move the initialization of the shadow values from the usb probe
to the comedi attach. Also rename the flag used to determine the
initial value from 'range_2_5' to 'is_unipolar'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:28:01 +0000 (14:28 -0700)]
staging: comedi: dt9812: use module_comedi_usb_driver()
Now that the semaphore used by the comedi_driver is initialized
when the comedi_device private data is allocated, the module_init()
in this driver just clears the 'slot' data before calling
comedi_usb_driver_register(). This static data will already be
cleared when the driver is loaded.
Replace the module_{init,exit}() with the module_comedi_usb_driver()
macro to remove the boilerplate code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:27:39 +0000 (14:27 -0700)]
staging: comedi: dt9812: move the sempaphore used by the comedi_driver
The semaphore in the struct slot_dt9812 is used by the comedi_driver
when reading and writing to the usb device. It has no real association
with the 'slot'. The 'slot' is protected with a static semaphore in
the driver.
Move the semaphore into the comedi_device private data and initialize
it after the private data is allocated.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:27:16 +0000 (14:27 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out_shadow()
For aesthetic reasons, instead of passing the 'slot' pointer, pass the
comedi_device pointer to this function and rename the local var 'result'
to simply 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:26:54 +0000 (14:26 -0700)]
staging: comedi: dt9812: tidy up the usb endpoint enumeration
Only the command_{write,read} usb endpoints are used by this driver.
Remove the message_pipe, and {read,write}_stream endpoint information
from the usb private data.
Rename the variables used for command endpoints to help keep the
lines < 80 chars.
Also, rename a couple of the local variables used to enumerate the
endpoints to also help keep the lines < 80 chars.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:26:28 +0000 (14:26 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out()
For aesthetic reasons, instead of passing the struct usb_dt9812 pointer,
pass the comedi_device pointer to this function and rename the local
variable 'result' to simply 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:26:05 +0000 (14:26 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_mux()
For aesthetic reasons, instead of passing the struct usb_dt9812 pointer,
pass the comedi_device pointer to this function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:25:42 +0000 (14:25 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_gain()
For aesthetic reasons, instead of passing the struct usb_dt9812 pointer,
pass the comedi_device pointer to this function.
Tidy up the function and use the comedi_device class_dev for the
dev_err() message.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:24:21 +0000 (14:24 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_in()
For aesthetic reasons, instead of passing the 'slot' pointer, pass the
comedi_device pointer to this function and rename the local var 'result'
to simply 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:23:57 +0000 (14:23 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out_shadow()
For aesthetic reasons, instead of passing the 'slot' pointer, pass the
comedi_device pointer to this function and rename the local var 'result'
to simply 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:23:35 +0000 (14:23 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out()
For aesthetic reasons, instead of passing the 'slot' pointer, pass the
comedi_device pointer to this function and rename the local var 'result'
to simply 'ret'.
Also, initialize the 'reg', and 'value' when they are declared.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:23:12 +0000 (14:23 -0700)]
staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_in()
For aesthetic reasons, instead of passing the 'slot' pointer, pass the
comedi_device pointer to this function and rename the local var 'result'
to simply 'ret'.
Remove the commented out printk().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:22:39 +0000 (14:22 -0700)]
staging: comedi: dt9812: tidy up usb_bulk_msg() calls
To clarify the code, add a local variable for the struct usb_device
pointer used in the usb_blk_msg() calls.
It's not necessary to initialize the 'count' when writing to the
usb device. The 'count' variable is used to get back the number
of bytes actually sent.
Just return the usb_blk_msg() result when it is the last operation
in a function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:22:11 +0000 (14:22 -0700)]
staging: comedi: dt9812: remove attaching by serial number
Currently this driver supports attaching 16 usb devices to 16
comedi devices. The user can pass the 32-bit serial number of
the usb device when attaching to force a comedi device to attach
to a specific usb device.
It's also possible to attach a comedi device without having an
attached usb device. When the device is first opened the
comedi_device (*open) function in this driver then checks to
see if a usb device has been attached. If so the subdevice
information is updated based on the usb device and the comedi
device is then operational. If a usb device is not attached
the (*open) returns -ENODEV.
To simplify converting this driver to the comedi (*auto_attach)
mechanism, remove the attaching by serial number option.
Modify the usb (*probe) so that the first available slot is used.
If all the slots are used return -ENODEV.
Modify the comedi (*attach) so that the first unused slot that
has an attached usb device is used. If all the slots are used
return -ENODEV.
Since this ensures that the comedi device has an attached usb
device, remove the (*open) function and fully initialize the
subdevices during the (*attach).
Fix the comedi (*detach) so that the slot is made available
after detaching.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:21:39 +0000 (14:21 -0700)]
staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812
Because of the usb (*probe) and comedi (*attach) disconnect, the struct
slot_dt9812 is used to pass the device data between the usb_driver and
the comedi_driver. The variable 'comedi' in this struct is used during
the comedi (*attach) to indicate if a slot is currently being used.
For aesthetic reasons, rename the variable to 'devpriv' since that is
what is actually saved in the pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:21:08 +0000 (14:21 -0700)]
staging: comedi: dt9812: rename the private data struct
The comedi private data (dev->private) for this driver is stored
in a 'struct comedi_dt9812' that is allocated during the comedi
(*attach).
For aesthetic reasons, rename this struct to help make its use
clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 21:20:43 +0000 (14:20 -0700)]
staging: comedi: dt9812: move the usb framework functions to EOF
In preparation of converting this manually attached comedi driver
into an auto attached comedi usb driver, move the usb framework
functions to the end of the file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:41:51 +0000 (13:41 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_ai_insn_read()
Remove the sanity check of devpriv, this function can only be called
by the comedi core if the private data is allocated.
Get the 'chan', 'range' and 'rngmask' from the function parameters
when the local variables are declared.
For aesthetic reasons, rename the local variable 'err' to 'ret'
since that name is more standard.
(*insn_read) functions are supposed to return the number of values
read or an error code. Change the final return to 'insn->n' to make
it clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:41:30 +0000 (13:41 -0700)]
staging: comedi: usbduxfast: introduce usbduxfast_cmd_data()
Introduce a helper function to set the buffer used to transfer
commands to the usb device.
Each command consists of four uint8_t values that are stored at
specific indexes in the buffer. The helper function consolidates
the code that sets the buffer to reduce coding errors and make
the driver a bit easier to understand.
Note, the '0xff & rngmask' can be reduced to simply 'rngmask'
since the rngmask is always an 8-bit value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:41:07 +0000 (13:41 -0700)]
staging: comedi: usbduxfast: rename usbduxfastsub_submit_InURBs()
Rename this CamelCase function to fix the checkpatch.pl warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:40:45 +0000 (13:40 -0700)]
staging: comedi: usbduxfast: rename CamelCase 'minSamplPer'
Rename the local variable to fix the checkpatch.pl warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:40:24 +0000 (13:40 -0700)]
staging: comedi: usbduxfast: consolidate the firmware upload
Absorb the usbduxfastsub_stop(), usbduxfastsub_upload(), and
usbduxfastsub_start() functions into usbduxfast_upload_firmware().
Each of them just do a usb_control_msg() to the device and output
an error message if it fails. A similar message is also output by
usbduxfast_upload_firmware() so the extra messages are redundant.
We can also share the malloc'ed local buffer needed for the
usb_control_msg().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:40:02 +0000 (13:40 -0700)]
staging: comedi: usbduxfast: move usbduxfast_upload_firmware()
For aesthetic reasons, move usbduxfast_upload_firmware() near its
only caller, usbduxfast_request_firmware().
Also, move the #define for the maximum firmware size so it's with
the other firmware defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:39:34 +0000 (13:39 -0700)]
staging: comedi: usbduxfast: tidy up firmwareUpload()
Rename the CamelCase function and just pass the const struct
firmware * directly instead of parsing out the data and size.
Rename the CamelCasae local val 'fwBuf'.
Use goto to provide a common exit path that frees the local
buffer for the firmware when an error is encountered.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:39:15 +0000 (13:39 -0700)]
staging: comedi: usbduxfast: fix a > 80 char line issue
Fix a line over 80 characters issue reported by checkpatch.pl.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:38:48 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_ai_cancel()
Remove the unnecessary comments and dev_err() noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:38:21 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_ai_stop()
Remove the devpriv sanity check, all the callers have previously
verified that its valid.
Absorb usbduxfast_unlink_urbs() into this function since it's the
only caller and the only thing it does is call usb_kill_urb().
This function will always succeed so just return 0 and remove the
local variable 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:38:00 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfastsub_unlink_InURBs()
Rename this function so it has namespace associated with the driver.
Remove the local variables 'j' and 'ret'. They are not used and the
function always returns '0'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:37:38 +0000 (13:37 -0700)]
staging: comedi: usbduxfast: tidy up send_dux_commands()
Rename this function so it has namespace associated with the driver.
For aesthetic reasons, rename the local variable 'tmp' to 'ret' as
this is more common for checking errno values.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 14 May 2013 20:37:07 +0000 (13:37 -0700)]
staging: comedi: usbduxfast: remove extra dev_err() messages
A dev_err() message is output if send_dux_commands() fails. Remove
the extra dev_err() messages output by the callers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>