H Hartley Sweeten [Wed, 27 Jun 2012 01:07:32 +0000 (18:07 -0700)]
staging: comedi: cb_pcidas: fix comments in private data struct
A number of the comments in the private data struct definition
are causing checkpatch.pl to complain about "WARNING: line over
80 characters". Fix the comments.
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 [Wed, 27 Jun 2012 01:06:52 +0000 (18:06 -0700)]
staging: comedi: cb_pcidas: remove 'volatile' on private data variables
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 27 Jun 2012 01:06:08 +0000 (18:06 -0700)]
staging: comedi: cb_pcidas: fix comments in *_cmdtest functions
Remove some cut-and-paste comments from the skel driver in the
*_cmdtest functions. Shorten some others to fix the checkpatch.pl
complaints about WARNING: line over 80 characters.
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 [Wed, 27 Jun 2012 01:05:12 +0000 (18:05 -0700)]
staging: comedi: cb_pcidas: fix some > 80 char lines
Fix some of the comments that cause checkpatch.pl to complain
about WARNING: line over 80 characters.
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 [Wed, 27 Jun 2012 01:04:26 +0000 (18:04 -0700)]
staging: comedi: cb_pcidas: fix a space before tab issue
As reported by checkpatch.pl, spaces should not be used before
tabs.
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 [Wed, 27 Jun 2012 01:03:34 +0000 (18:03 -0700)]
staging: comedi: cb_pcidas: check for failure of subdev_8255_init
It's possible for subdev_8255_init() to fail due to its kzalloc().
Make sure to check for this failure and pass on the error 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 [Wed, 27 Jun 2012 01:02:40 +0000 (18:02 -0700)]
staging: comedi: cb_pcidas: use the driver_name for the resource name
Use the dev->driver->driver_name for the resource name passed
to pci_request_regions(), by way of comedi_pci_enable(), and
to request_irq() instead of the open coded "cb_pcidas".
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 [Wed, 27 Jun 2012 01:01:51 +0000 (18:01 -0700)]
staging: comedi: cb_pcidas: move the "find pci" dev_printk messages
Move the dev_printk messages associated with the "find pci device"
from the *attach function into the *find_pci_device 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 [Wed, 27 Jun 2012 01:01:05 +0000 (18:01 -0700)]
staging: comedi: cb_pcidas: cleanup ai_config_insn()
Absorb the helper function ai_config_calibration_source() into
ai_config_insn() and remove the static const variable that
was in the helper function.
Return an error code (-EINVAL) when appropriate and the number
of data values used (insn->n) for success.
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 [Wed, 27 Jun 2012 01:00:19 +0000 (18:00 -0700)]
staging: comedi: cb_pcidas: cleanup the boardinfo 4
For aesthetic reasons, rename the ai_se_chans variable to
ai_nchan. It's a bit shorter and provides the necessary
information about the variable.
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 [Wed, 27 Jun 2012 00:59:17 +0000 (17:59 -0700)]
staging: comedi: cb_pcidas: cleanup the boardinfo 3
Remove the ai_diff_chans variable. This option is not used in
the driver. If it is used later, the value can be easily found
by using ai_se_chans/2.
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 [Wed, 27 Jun 2012 00:58:27 +0000 (17:58 -0700)]
staging: comedi: cb_pcidas: cleanup the boardinfo 2
Remove all the boardinfo values that are = 0. They will
default to that 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 [Wed, 27 Jun 2012 00:57:20 +0000 (17:57 -0700)]
staging: comedi: cb_pcidas: cleanup the boardinfo 1
For aesthetic reasons, add whitespace to the boardinfo to
improve readability.
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 [Wed, 27 Jun 2012 00:56:43 +0000 (17:56 -0700)]
staging: comedi: cb_pcidas: simplify the boardinfo
The boardinfo values 'has_ai_trig_gated' and 'has_ai_trig_invert'
are both only set for the "1602" versions of the boards supported
by this driver.
Simplify the boardinfo, and the code, by replacing these two
variables with one "is_1602" variable.
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 [Wed, 27 Jun 2012 00:56:04 +0000 (17:56 -0700)]
staging: comedi: cb_pcidas: remove unused io region size defines
The defines for the size of the io regions are not used in the
driver. Also, this information can be found using the pci helper
pci_resource_len(). Remove the 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 [Wed, 27 Jun 2012 00:55:21 +0000 (17:55 -0700)]
staging: comedi: cb_pcidas: remove CB_PCIDAS_DEBUG define
This define enables some debug code that output a number
of dev_dbg() messages. These might be useful for development
but should not be in the final driver.
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 [Wed, 27 Jun 2012 00:54:38 +0000 (17:54 -0700)]
staging: comedi: cb_pcidas: remove the PCI BAR index defines
The defines for the "indices of the base address regions" don't
add much to the readability of the code. They are only used in
the pci_resource_start() calls to get the base address for
the various io regions and the names of the variables provide
adequate documentation.
Remove the defines and just use the open-coded values for the
BARs. Also, remove the incomplete comment above the initialization
of the 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 [Wed, 27 Jun 2012 00:53:55 +0000 (17:53 -0700)]
staging: comedi: cb_pcidas: remove some obvious comments in the attach
These comments are unnecessary.
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 [Wed, 27 Jun 2012 00:53:08 +0000 (17:53 -0700)]
staging: comedi: cb_pcidas: factor out the find pci device code
Factor the "find pci device" code out of the attach 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 [Wed, 27 Jun 2012 00:52:29 +0000 (17:52 -0700)]
staging: comedi: cb_pcidas: remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having
a specific name and yield pointers derived from that local variable.
Replace the macros with local variables where used. use the
comedi_board() helper to get the 'thisboard' 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 [Wed, 27 Jun 2012 00:51:53 +0000 (17:51 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 9
Move the nvram_read function, and its helper, to remove the need
for the last of the forward declarations.
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 [Wed, 27 Jun 2012 00:51:14 +0000 (17:51 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 8
Move the trimpot_{7376,8402}_write functions to remove the need
for the forward declarations.
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 [Wed, 27 Jun 2012 00:50:36 +0000 (17:50 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 7
Move the caldac_8800_write function, and it's helper, to remove
the need for the forward declaration.
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 [Wed, 27 Jun 2012 00:49:58 +0000 (17:49 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 6
Move the cb_pcidas_load_counters function to remove the need for
the forward declaration.
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 [Wed, 27 Jun 2012 00:49:22 +0000 (17:49 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 5
Move the cb_pcida_ao_cancel function to remove the need for
the forward declaration.
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 [Wed, 27 Jun 2012 00:48:43 +0000 (17:48 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 4
Move the cb_pcida_cancel function to remove the need for
the forward declaration.
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 [Wed, 27 Jun 2012 00:48:05 +0000 (17:48 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 3
Move the handle_ao_interrupt function to remove the need for
the forward declaration.
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 [Wed, 27 Jun 2012 00:47:28 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 2
Move the cb_pcidas_ao_inttrig function to remove the need for
the forward declaration.
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 [Wed, 27 Jun 2012 00:46:44 +0000 (17:46 -0700)]
staging: comedi: cb_pcidas: remove forward declarations 1
Move the attach/detach functions to remove the need for some
of the forward declarations.
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>
Javier Martinez Canillas [Tue, 26 Jun 2012 22:22:20 +0000 (00:22 +0200)]
staging: gdm72xx: fix an skb memory leak
The NLMSG_PUT() macro contains a hidden goto that jumps to the
nlmsg_failure label. Since the sk_buff was allocated before the macro,
jumping to the nlmsg_failure label leaks the memory allocated for it.
Calling kfree() before returning would fix it, but is better to avoid
using this error prone macro and use nlmsg_put() instead.
Also, use nlmsg_data() instead of NLMSG_DATA() to check type.
Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 17:08:52 +0000 (10:08 -0700)]
staging: comedi: cb_das16_cs: remove unneeded default case in analog in read
The default (return -EINVAL) case is not needed when working
out the correct value to set the analog input range. As pointed
out by Ian Abbott, the comedi core checks the range in
comedi_check_chanlist() before calling the insn_read() function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 17:07:23 +0000 (10:07 -0700)]
staging: comedi: cb_das16_cs: reword the comment about PCMCIA support
The original comment about the PCMCIA support code was wrong in that
it said this driver was for the "pcm-das08". When it was moved the
comment was reworded badly.
Fix the comment so it makes sense.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:23:44 +0000 (17:23 -0700)]
staging: comedi: cb_das16_cs: fix a multi-line comment
Fix a multi-line comment to follow the kernel CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:23:06 +0000 (17:23 -0700)]
staging: comedi: cb_das16_cs: remove some commented out debug
The das16cs_ao_winsn() function has a couple commented out
debug messages. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:22:18 +0000 (17:22 -0700)]
staging: comedi: cb_das16_cs: use the BIP_RANGE helper macro
The BIP_RANGE(a) macro can be used instead of the RANGE(a,b)
macro when -a == b. And it's a bit clearer that this is a bipolar
range.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:21:17 +0000 (17:21 -0700)]
staging: comedi: cb_das16_cs: remove unused variable in private data
The 'link' variable in the private data struct is not used by the
driver. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:18:43 +0000 (17:18 -0700)]
staging: comedi: cb_das16_cs: use #define'd io reg offsets
Instead of open coding the 'dev->iobase + n' for each io register
in the device, use the provided #define's for the offsets.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:17:52 +0000 (17:17 -0700)]
staging: comedi: cb_das16_cs: cleanup das16cs_ai_rinsn()
Cleanup to analog input read function.
1) Initialize the chan, range, and aref locale variables when
they are declared.
2) Remove need for the static local variable.
3) Remove the unnecessary cast of inw()'s return value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:16:53 +0000 (17:16 -0700)]
staging: comedi: cb_das16_cs: add whitespace to the subdev init
Add some whitespace to the subdev initialization to improve
readability.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:16:04 +0000 (17:16 -0700)]
staging: comedi: cb_das16_cs: return '0' for successful attach
The comedi core expects a < 0 value during the attach to indicate
an error. The normal 'success' return to the kernel is '0' so use
that here.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:15:21 +0000 (17:15 -0700)]
staging: comedi: cb_das16_cs: consolidate the attach messages
Consolidate all the attach messages into one dev_info() output
at the end of the successful attach.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:13:23 +0000 (17:13 -0700)]
staging: comedi: cb_das16_cs: cleanup the boardinfo
For aesthetic reasons, reorder the boardinfo to match the
MODULE_DEVICE_TABLE. Also reorder the data to match the
struct definition and add some whitespace to improve
readability.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:12:41 +0000 (17:12 -0700)]
staging: comedi: cb_das16_cs: remove the debug output of the "fingerprint"
During the attach, all of the device i/o registers are read and
the data is output as a dev_dbg() "fingerprint". This just adds
a bunch of noise during the loading of the driver. Remove the
output.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:11:56 +0000 (17:11 -0700)]
staging: comedi: cb_das16_cs: probe for the device first
During the attach of the comedi_driver, the device type probe
can fail. We should do the probe before requesting the irq
for the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:11:13 +0000 (17:11 -0700)]
staging: comedi: cb_das16_cs: remove unneeded include
This driver is not for a pci device. Remove the unneeded include
of the pci.h header.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:10:30 +0000 (17:10 -0700)]
staging: comedi: cb_das16_cs: fix analog output subdevice init
The analog output subdevice is only available on the -AO version
of the DAS16/16 device and the number of channels is provided in
the boardinfo. Make sure the subdevice is marked as unused for
devices that do not support the analog out.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Jun 2012 00:00:19 +0000 (17:00 -0700)]
staging: comedi: cb_das16_cs: cleanup dio subdevice initialization
The digital i/o subdevice is always initialized due to the 'if (1)'.
Simplify the attach by removing the test.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:59:26 +0000 (16:59 -0700)]
staging: comedi: cb_das16_cs: remove unused timer subdevice
The timer subdevice is never initialized due to the 'if (0)'. The
comedi callbacks also don't do anything and just return -EINVAL.
Remove the subdevice and associated code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:58:34 +0000 (16:58 -0700)]
staging: comedi: cb_das16_cs: remove skel driver cut-and-paste comments
There are a number of comments in this driver that are cut-and-paste
from the skel driver. They are not needed in "real" drivers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:57:36 +0000 (16:57 -0700)]
staging: comedi: cb_das16_cs: remove n_boards define
The 'n_boards' define is only used one place in the driver.
Just put the ARRAY_SIZE() where used and remove the define.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:37:10 +0000 (16:37 -0700)]
staging: comedi: cb_das16_cs: remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having
a specific name and yield pointers derived from that local variable.
Replace the macro with local variables where used. Use the
comedi_board() helper to get the 'thisboard' pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:36:20 +0000 (16:36 -0700)]
staging: comedi: cb_das16_cs: refactor the comedi attach/detach
Move the comedi_driver attach/detach functions, as well as the
probe function used during the attach. This removes the need
for all the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:23:38 +0000 (16:23 -0700)]
staging: comedi: cb_das16_cs: Move the comedi_driver variable
Move the comedi_driver variable to remove the need for the
forward declarations. Add some whitespace to the declaration
for aesthetic reasons.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:22:52 +0000 (16:22 -0700)]
staging: comedi: cb_das16_cs: remove unneeded pcmcia private data
The pcmcia device-specific data is not longer needed by this
driver. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:21:47 +0000 (16:21 -0700)]
staging: comedi: cb_das16_cs: remove the pcmcia suspend/resume
The pcmcia suspend/resume callbacks don't do anything. Remove
them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:20:36 +0000 (16:20 -0700)]
staging: comedi: cb_das16_cs: remove unused pcmcia 'stop' logic
The pcmcia support code in this driver appears to be cut-and-
paste from some other driver. It has code in it to stop the
device during suspend but nothing in the main comedi_driver
uses it.
Remove the 'stop' variable from the pcmcia private data and
all the logic that deals with it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:19:32 +0000 (16:19 -0700)]
staging: comedi: cb_das16_cs: refactor the pcmcia attach/detach
Move the pcmcia_disable_device() call where needed in the
pcmcia attach/detach and delete the das16cs_pcmcia_release()
function.
Move the logic of das16cs_pcmcia_config() directly into the
attach function and properly return an error code when the
config fails.
Only set the cur_dev, used by the comedi_driver, if the pcmcia
attach is successful. Also, make sure to NULL it in the detach.
Remove all the kernel messages in the pcmcia support code. They
are just added noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:15:40 +0000 (16:15 -0700)]
staging: comedi: cb_das16_cs: refactor the pcmcia support code
Refactor the pcmcia support code to remove the need for the
forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 23:10:37 +0000 (16:10 -0700)]
staging: comedi: cb_das16_cs: remove some useless comments
Remove some useless comments and whitespace.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:57:49 +0000 (15:57 -0700)]
staging: comedi: cb_das16_cs: cleanup the pcmcia_driver declaration
For aesthetic reasons, add some whitespace to the declaration
of the pcmcia_driver and reorder it a bit.
Also, the symbol 'das16cs_driver' is only referenced in this file,
make it static. This quiets the following sparse warning:
warning: symbol 'das16cs_driver' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:20:53 +0000 (15:20 -0700)]
staging: comedi: cb_das13_cs: change driver registration order
As done with the other comedi driver types, register the
comedi_driver first then the pcmcia_driver. Also, make
sure the pcmcia_driver registration succeeds and unregister
the comedi_driver it it fails.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:20:13 +0000 (15:20 -0700)]
staging: comedi: cb_das16_cs: consolidate the init and exit functions
The register/unregister of the pcmcia driver is done is separate
functions that are called by the module_{init,exit} routines.
Simplify the code a bit by moving the register/unregister into
the module_{init,exit} routines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:18:17 +0000 (15:18 -0700)]
staging: comedi: cb_das16_cs: add module_{init, exit} declarations
The init and exit functions for this module were being declared
as global symbols. Add the module_{init,exit} declarations and
make the functions static. Also, rename the functions so they
have namespace associated with the module.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:17:20 +0000 (15:17 -0700)]
staging: comedi: cb_das16_cs: move the MODULE_* stuff to the EOF
Move the MODULE_* declarations to the end of the file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Jun 2012 22:15:58 +0000 (15:15 -0700)]
staging: comedi: cb_das16_cs: remove CONFIG_PCMCIA check
The Kconfig ensures that this driver can only be build it PCMCIA is
enabled. Remove the unneeded '#if defined (CONFIG_PCMCIA) ,,,' and
the '#else' code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 25 Jun 2012 18:49:38 +0000 (19:49 +0100)]
staging: comedi: Move COMEDI_MITE and COMEDI_NI_TIOCMD
Move the CONFIG_COMEDI_MITE config options into the `if
COMEDI_PCI_DRIVERS` block so that the `depends on PCI` condition can be
omitted. Move the CONFIG_COMEDI_NI_TIOCMD config option to the same
block as it selects COMEDI_MITE. Move the CONFIG_COEMDI_NI_TIO config
option slightly for aesthetic reasons without changing its conditions.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 25 Jun 2012 18:49:37 +0000 (19:49 +0100)]
staging: comedi: Simplify NI driver configuration
At the moment, the options to select drivers for various National
Instruments boards in the "Comedi PCI drivers", "Comedi ISA and PC/104
drivers" and "Comedi PCMCIA drivers" menus do not appear unless you
first enable and enter the "Comedi National Instruments card support"
menu and possibly select some of the options in there. This is pretty
confusing for the user.
Get rid of the "Comedi National Instruments card support" menu
(CONFIG_COMEDI_NI_COMMON) and make the CONFIG_COMEDI_MITE,
CONFIG_COMEDI_NI_TIO and CONFIG_COMEDI_NI_TIOCMD options selectable by
other options instead of dependencies of those other options.
We lose the ability to build the 'mite', 'ni_tio' and 'ni_tiocmd'
modules independently of other modules, but they are not useful on their
own anyway.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 25 Jun 2012 18:49:36 +0000 (19:49 +0100)]
staging: comedi: Move COMEDI_NI_LABPC config option
Move the CONFIG_COMEDI_NI_LABPC option ("NI Lab-PC and compatibles ISA
and PCI support") from the CONFIG_COMEDI_NI_COMMON menu ("Comedi
National Instruments card support --->") to the
CONFIG_COMEDI_PCI_DRIVERS menu ("Comedi PCI drivers --->").
It currently depends on PCI but should be split up into separate ISA and
PCI config options eventually as was done for the "das08" driver. For
now, the PCI card menu seems the best place for it and I plan to get rid
of the CONFIG_COMEDI_NI_COMMON menu altogether.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 25 Jun 2012 18:49:35 +0000 (19:49 +0100)]
staging: comedi: split CONFIG_COMEDI_NI_TIO option
Selecting the CONFIG_COMEDI_NI_TIO config option causes the 'ni_tio' and
'ni_tiocmd' modules to be built. CONFIG_COMEDI_NI_TIO depends on
CONFIG_COMEDI_MITE which in turn depends on CONFIG_PCI. However, not
all the drivers that need the 'ni_tio' module also need the 'ni_tiocmd'
module. Specifically, the ISA and PCMCIA drivers do not need the
'ni_tiocmd' module.
Add a new config option CONFIG_COMEDI_NI_TIOCMD to control building of
the 'ni_tiocmd' module. It depends on CONFIG_COMEDI_NI_TIO and
CONFIG_COMEDI_MITE. The existing CONFIG_COMEDI_NI_TIO option no longer
needs to depend on CONFIG_COMEDI_MITE.
Make CONFIG_COMEDI_NI_660X ('ni_660x' module) and
CONFIG_COMEDI_NI_PCIMIO ('ni_pcimio' module) depend on
CONFIG_COMEDI_NI_TIOCMD instead of CONFIG_COMEDI_NI_TIO.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 26 Jun 2012 12:03:41 +0000 (13:03 +0100)]
staging: ozwpan: Update TODO file
Update TODO file.
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 26 Jun 2012 12:03:39 +0000 (13:03 +0100)]
staging: ozwpan: Unregister with sysfs while unloading.
Destroy device node & unregister device class from sysfs while unloading
driver
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Tue, 26 Jun 2012 04:00:17 +0000 (06:00 +0200)]
staging: sm7xxfb: code cleanup on smtcfb_setmode
Code cleanup on smtcfb_setmode.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Tue, 26 Jun 2012 04:00:16 +0000 (06:00 +0200)]
staging: sm7xxfb: delete unnecessary color map allocation
This patchs erases fb_alloc_cmap call in smtc_free_fb_info. In the
future, when needed, the required function to call here should be
fb_dealloc_cmap.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Tue, 26 Jun 2012 04:00:15 +0000 (06:00 +0200)]
staging: sm7xxfb: dead code removal
This patch removes dead code related to BaseAddressInVRAM. It fixes
comment on RAM control bits too.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Tue, 26 Jun 2012 04:00:14 +0000 (06:00 +0200)]
staging: sm7xxfb: dead code removal
This patch removes dead code.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sherwin Soltani [Tue, 26 Jun 2012 06:00:30 +0000 (02:00 -0400)]
drivers: staging: android: binder.c: fix printk macros
Change printk() messages to pr_* macros.
Signed-off-by: Sherwin Soltani <sherwin@wybc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars-Peter Clausen [Tue, 26 Jun 2012 08:45:43 +0000 (10:45 +0200)]
iio:dac:ad5446: Add support for the AD5450/51/52/53
This patch adds support for the Analog Devices AD5450/51/52/53 Digital-to-Analog
converters.
The AD5452 and AD5453 are software compatible to the existing AD5444 and AD5446.
The AD5450 and AD5451 are similar but have a smaller resolution.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars-Peter Clausen [Tue, 26 Jun 2012 08:43:05 +0000 (10:43 +0200)]
iio:adc:at91: Relase mutex on error path in at91_adc_read_raw
This issue was reported by the mini_lock.cocci coccinelle semantic patch.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:17 +0000 (23:12 +0200)]
staging: iio: quell asprintf() warning, missing #includes
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:16 +0000 (23:12 +0200)]
staging: iio: use PRId64 format specifier for int64_t
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:15 +0000 (23:12 +0200)]
staging: iio: fix warning 'static but used in inline function'
iio_utils.h:367:10: warning: ‘iioutils_break_up_name’ is static but used in inline function ‘build_channel_array’ which is not static [enabled by default]
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:14 +0000 (23:12 +0200)]
staging: iio: generic_buffer cleanup
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:13 +0000 (23:12 +0200)]
staging: iio: move comment
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:12 +0000 (23:12 +0200)]
staging: iio: remove unused variable
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Meerwald [Mon, 25 Jun 2012 21:12:11 +0000 (23:12 +0200)]
staging: iio: fix generic_buffer print2byte()
drop extra argument, move cast
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lauri Hintsala [Thu, 21 Jun 2012 10:29:12 +0000 (13:29 +0300)]
Staging: csr: add WEXT and AP mode support
Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:48 +0000 (01:57 +0200)]
staging: vt6656: iwctl: Clean up braces on 'if' statements
Clean up braces on 'if' statements to (mostly) match coding style.
A few other bits, like removing a few blank lines and such may have snug in.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:39 +0000 (01:57 +0200)]
staging: vt6656: iwctl: Cleanup spacing around operators (mostly)
This cleans up spacing around operators according to CodingStyle.
(A few deletions of empty lines that were missed by a previous patch are also included.
A few bits and pieces broken on multiple lines were put one one line as well).
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:32 +0000 (01:57 +0200)]
staging: vt6656: iwctl: one statement per line (if)
Statement following 'if' should be on its own line.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:27 +0000 (01:57 +0200)]
staging: vt6656: iwctl: comment cleanup
All comments now have one space between the code they follow and the
comment start chars and one space after the comment start chars and
the comment text.
Also cleaned up some spacing within comments - mostly removed space
before ':' and added space after ',' etc.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:20 +0000 (01:57 +0200)]
staging: vt6656: iwctl: space after if/for/while/switch
Our coding style dictates a space after if/for/while/switch and the
opening parenthesis.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:13 +0000 (01:57 +0200)]
staging: vt6656: iwctl: remove spaces between casts and variables
We do not usually write a space between a cast and the variable being
converted. this patch removes such spaces where they occour in iwctl.c
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:57:07 +0000 (01:57 +0200)]
staging: vt6656: iwctl: remove unneeded scope block in iwctl_siwessid()
Reduce indentation by removing completely redundant scope block in the
iwctl_siwessid() function.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:59 +0000 (01:56 +0200)]
staging: vt6656: iwctl: remove redundant cast (to PSDevice)
netdev_priv() returns a void*, so there is no reason to explicitly
cast to (PSDevice) when assigning to a variable of type PSDevice. The
cast is done implicitly.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:50 +0000 (01:56 +0200)]
staging: vt6656: iwctl: ensure one space between defined name and value
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:43 +0000 (01:56 +0200)]
staging: vt6656: iwctl: Fix up variable declarations (whitespace and 'one-per-line')
Ensure that we have only one variable declaration per line and for
each of those lines we have one space between type and variable name
and if there's assignment, then we have one space on each side of the
equals sign (and no more than 80 characters per line).
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:35 +0000 (01:56 +0200)]
staging: vt6656: iwctl: remove redundant ';'
else clauses don't need to be terminated with ';'.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:15 +0000 (01:56 +0200)]
staging: vt6656: iwctl: Fix indentation
Fix indentation for the entire files to use tabs rather than spaces
and also make sure everything is indented to the proper depth
according to context.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:56:05 +0000 (01:56 +0200)]
staging: vt6656: iwctl: fix up function declarations/prototypes
The way function prototypes/declarations are written in iwctl.[ch] is
an inconsistent mess.
This patch makes the whole thing consistent by putting the first
function arguments (op to a column width of at most 80) on the same
line as the function name and the remaining ones on the following line
indented by two tabs.
Besides getting rid of the current tabs vs spaces mess it also
shortens the files quite a bit and puts them more in line with most
other kernel files.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 24 Jun 2012 23:55:54 +0000 (01:55 +0200)]
staging: vt6656: iwctl: Remove redundant blank lines
There are a number of excessive blank lines in iwctl.c - this patch
gets rid of most of those that I personally considered the most
obvious ones.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>