openwrt/staging/blogic.git
10 years agostaging: vt6655: fix direct dereferencing of user pointer
Guillaume Clement [Fri, 25 Jul 2014 12:47:23 +0000 (14:47 +0200)]
staging: vt6655: fix direct dereferencing of user pointer

Sparse reported that the data from tagSCmdRequest is given by
userspace, so it should be tagged as such.

Later, we were memcomparing and dereferencing it without first copying
it, fix that as well.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: vm_insert_pfn and zap_page_range rely on CONFIG_MMU
Fabian Frederick [Wed, 23 Jul 2014 19:04:38 +0000 (21:04 +0200)]
staging: ion: vm_insert_pfn and zap_page_range rely on CONFIG_MMU

Fix following sh-allmodconfig errors reported on kisskb
"
drivers/built-in.o: In function `ion_vm_fault':
ion.c:(.text+0x1f2d8f8): undefined reference to `vm_insert_pfn'
drivers/built-in.o: In function `ion_buffer_sync_for_device':
ion.c:(.text+0x1f316bc): undefined reference to `zap_page_range'
make: *** [vmlinux] Error 1
"

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: sep: remove driver
Kristina Martšenko [Sun, 27 Jul 2014 19:59:50 +0000 (22:59 +0300)]
staging: sep: remove driver

Looks like no one's working on the driver anymore, so remove it for now.
If someone wants to work on moving it out of staging, this commit can be
reverted.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Mark A. Allyn <mark.a.allyn@intel.com>
Cc: Jayant Mangalampalli <jayant.mangalampalli@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: remove procfs entries
Nicolas Thery [Sun, 27 Jul 2014 18:32:06 +0000 (20:32 +0200)]
staging: ft1000: remove procfs entries

This patch started as a fix to some checkpatch complaints in ft1000
procfs code but Greg suggested to remove the procfs entries altogether:

http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2014-July/055594.html

Signed-off-by: Nicolas Thery <nthery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lov: Fix sparse warning using plain integer as NULL pointer
Marc Fite [Sun, 27 Jul 2014 18:31:08 +0000 (20:31 +0200)]
staging: lustre: lov: Fix sparse warning using plain integer as NULL pointer

This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL.

drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer

Signed-off-by: Marc Fite <marc@fite.cat>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fixed a space coding style issue
Sylvain Calador [Sun, 27 Jul 2014 17:35:48 +0000 (19:35 +0200)]
staging: rtl8821ae: fixed a space coding style issue

Fixed a coding style issue.

Signed-off-by: Sylvain Calador <sylvain.calador@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: usbip: stub_main.c: Cleaning up missing null-terminate in conjunction with...
Rickard Strandqvist [Sat, 26 Jul 2014 14:43:20 +0000 (16:43 +0200)]
staging: usbip: stub_main.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: include: uisutils.h: Cleaning up missing null-terminate in conjuncti...
Rickard Strandqvist [Sat, 26 Jul 2014 14:41:46 +0000 (16:41 +0200)]
staging: unisys: include: uisutils.h: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: remove commented code
Seunghun Lee [Fri, 25 Jul 2014 16:49:01 +0000 (01:49 +0900)]
staging: dgnc: remove commented code

This patch removes commented code in dgnc driver.

CC: Lidza Louina <lidza.louina@gmail.com>
CC: Mark Hounschell <markh@compro.net>
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from power.h
Igor Bezukh [Fri, 25 Jul 2014 16:53:12 +0000 (19:53 +0300)]
Staging: vt6655: removed redundant comments from power.h

Removed redundant comments from power.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from michael.h
Igor Bezukh [Fri, 25 Jul 2014 16:50:25 +0000 (19:50 +0300)]
Staging: vt6655: removed redundant comments from michael.h

Removed redundant comments from michael.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from mib.h
Igor Bezukh [Fri, 25 Jul 2014 16:48:48 +0000 (19:48 +0300)]
Staging: vt6655: removed redundant comments from mib.h

Removed redundant comments from mib.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from iowpa.h
Igor Bezukh [Fri, 25 Jul 2014 16:33:04 +0000 (19:33 +0300)]
Staging: vt6655: removed redundant comments from iowpa.h

Removed redundant comments from iowpa.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from ioctl.h
Igor Bezukh [Fri, 25 Jul 2014 16:31:26 +0000 (19:31 +0300)]
Staging: vt6655: removed redundant comments from ioctl.h

Removed redundant comments from ioctl.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from iocmd.h
Igor Bezukh [Fri, 25 Jul 2014 16:29:28 +0000 (19:29 +0300)]
Staging: vt6655: removed redundant comments from iocmd.h

Removed redundant comments from iocmd.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from IEEE11h.h
Igor Bezukh [Fri, 25 Jul 2014 16:26:14 +0000 (19:26 +0300)]
Staging: vt6655: removed redundant comments from IEEE11h.h

Removed redundant comments from IEEE11h.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from hostap.h
Igor Bezukh [Fri, 25 Jul 2014 16:22:35 +0000 (19:22 +0300)]
Staging: vt6655: removed redundant comments from hostap.h

Removed redundant comments from hostap.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from dpc.h
Igor Bezukh [Fri, 25 Jul 2014 16:20:50 +0000 (19:20 +0300)]
Staging: vt6655: removed redundant comments from dpc.h

Removed redundant comments from dpc.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from device_cfg.h
Igor Bezukh [Fri, 25 Jul 2014 16:10:36 +0000 (19:10 +0300)]
Staging: vt6655: removed redundant comments from device_cfg.h

Removed redundant comments from device_cfg.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from desc.h
Igor Bezukh [Fri, 25 Jul 2014 16:05:31 +0000 (19:05 +0300)]
Staging: vt6655: removed redundant comments from desc.h

Removed redundant comments from desc.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
C99 style comments will be fixed in further patches.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from channel.h
Igor Bezukh [Fri, 25 Jul 2014 15:39:36 +0000 (18:39 +0300)]
Staging: vt6655: removed redundant comments from channel.h

Removed redundant comments from channel.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from country.h
Igor Bezukh [Fri, 25 Jul 2014 15:43:22 +0000 (18:43 +0300)]
Staging: vt6655: removed redundant comments from country.h

Removed redundant comments from country.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: removed redundant comments from datarate.h
Igor Bezukh [Fri, 25 Jul 2014 15:47:53 +0000 (18:47 +0300)]
Staging: vt6655: removed redundant comments from datarate.h

Removed redundant comments from datarate.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: remove redundant comments from card.h
Igor Bezukh [Fri, 25 Jul 2014 15:34:23 +0000 (18:34 +0300)]
Staging: vt6655: remove redundant comments from card.h

Removed redundant comments from card.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: DDRInit.c: fixed coding style: lines over 80 char
Sudip Mukherjee [Fri, 25 Jul 2014 14:35:37 +0000 (20:05 +0530)]
staging: bcm: DDRInit.c: fixed coding style: lines over 80 char

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: set board_name before common attach
Ian Abbott [Fri, 25 Jul 2014 09:04:58 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: set board_name before common attach

For PCI boards, the `auto_attach` handler, `pc236_auto_attach()`,
initializes `dev->board_ptr` to point to a `struct pc236_board`, but
leaves `dev->board_name` unchanged.  The Comedi core will have
initialized `dev->board_name` to the `driver_name` string member of
`amplc_pc236_driver`.  For consistency with ISA boards manually
configured by the `COMEDI_DEVCONFIG` ioctl via the legacy `attach`
handler, `pc236_attach()`, set `dev->board_name` to the `name` member of
the `struct pc236_board` pointed to by `dev->board_ptr`.

Both `pc236_attach()` and `pc236_auto_attach()` call
`pc236_common_attach()`, which also sets `dev->board_name` to the `name`
member of the `struct pc236_board`.  Since this assignment no longer
changes anything, remove it.

A nice side-effect of this change is that the same owner name string is
used for requesting I/O regions (before the call the
`pc236_common_attach()`) as is used for requesting the IRQ handler
(during the call to `pc236_common_attach()`).  It was already the same
for (manually configured) ISA boards, but is now the same for
(automatically configured) PCI boards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: remove PCI device ID macros
Ian Abbott [Fri, 25 Jul 2014 09:04:57 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: remove PCI device ID macros

The `PCI_DEVICE_ID_AMPLICON_PCI236` macro is only used once, in the
module device table, so remove it and expand the macro in the table.

`The `PCI_DEVICE_ID_INVALID` macro is no longer used, so remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: Simplify PCI board look-up
Ian Abbott [Fri, 25 Jul 2014 09:04:56 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: Simplify PCI board look-up

Since only a single PCI board is supported by the driver, there is no
need to call `pc236_find_pci_board()` to find the a board entry with
matching PCI device ID in `pc236_pci_boards[]`.  Just point to the entry
directly and remove the look-up function.  In fact, there is no reason
for `pc236_pci_boards[]` to be an array, so change it to a non-array
variable and rename it to `pc236_pci_board`.  Also, the `devid` member
of `struct pc236_board` is no longer needed as it was only used by the
look-up function, so remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: don't check bus type in attach
Ian Abbott [Fri, 25 Jul 2014 09:04:55 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: don't check bus type in attach

Since the legacy attach routine `pc236_attach()` is only called for
board names matching an entry in our array of ISA boards
`pc236_isa_boards[]`, and it is reasonable to expect all elements of
`pc236_isa_boards[]` to have their `bustype` member initialized
correctly to `isa_bustype`, don't bother checking the bus type in
`pc236_attach()`.  Add `if (!DO_ISA) return -EINVAL` to optimize out the
remainder of the function if `CONFIG_COMEDI_AMPLC_PC236_ISA` is not
defined.

Similarly, don't bother checking the bus type in
`pc236_find_pci_board()` as it is reasonable to expect all elements of
`pc236_pci_boards[]` to have their `bustype` member initialized
correctly to `pci_bustype`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: split pc236_boards[] into ISA & PCI
Ian Abbott [Fri, 25 Jul 2014 09:04:54 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: split pc236_boards[] into ISA & PCI

Split `pc236_boards[]` into `pc236_isa_boards[]` for ISA cards and
`pc236_pci_boards[]` for PCI cards (there is only one of each).  Only
initialize the board name look-up members of `struct comedi_driver
amplc_pc236_driver` if the ISA part of the driver is enabled in the
kernel config (`CONFIG_COMEDI_AMPLC_PC236_ISA`) using the array of ISA
boards (`pc236_isa_boards[]`).  The driver doesn't allow manual
configuration of PCI devices, so there is no point having the comedi
core match the names of the PCI boards before it calls our driver's
legacy attach routine (`pc236_attach()`).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: remove 'model' member
Ian Abbott [Fri, 25 Jul 2014 09:04:53 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: remove 'model' member

The `model` member of `struct pc236_board` is no longer used since the
code to remove manual configuration of PCI devices was removed.  Get rid
of it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: absorb pc236_pci_common_attach()
Ian Abbott [Fri, 25 Jul 2014 09:04:52 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: absorb pc236_pci_common_attach()

Absorb `pc236_pci_common_attach()` into `pc236_auto_attach()` since
that's the only place it is called from.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: no need to set hw_dev
Ian Abbott [Fri, 25 Jul 2014 09:04:51 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: no need to set hw_dev

The call to `comedi_set_hw_dev()` from `pc236_pci_common_attach()` is
now unnecessary since `pc236_pci_common_attach()` is now only called
from this driver's `auto_attach` hook `pc236_auto_attach()` and the
comedi core now calls `comedi_set_hw_dev()` before calling that.  Remove
the unnecessary call.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: no need to manipulate PCI ref count
Ian Abbott [Fri, 25 Jul 2014 09:04:50 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: no need to manipulate PCI ref count

Now that this driver no longer supports "manual" attachment of PCI
devices in its `attach` hook (`pc236_attach()`), it no longer has code
that searches for a suitable PCI device and increments its reference
count.  Since the driver no longer has any reason for incrementing and
decrementing the PCI device's reference count, the calls to
`pci_dev_get()` and `pci_dev_put()` can be removed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: remove manual configuration of PCI boards
Ian Abbott [Fri, 25 Jul 2014 09:04:49 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: remove manual configuration of PCI boards

Remove the code that allows PCI boards to be manually attached by the
`COMEDI_DEVCONFIG` ioctl (or the "comedi_config" application).
Supported PCI boards (PCI236) will be attached automatically at probe
time via `comedi_pci_auto_config()` and the `auto_attach` hook in the
`struct comedi_driver`.

The "wildcard" entry in `pc236_boards[]` was only used when manually
attaching a PCI board using a driver name instead of a board name, so is
no longer needed.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: remove some boilerplate comments
Ian Abbott [Fri, 25 Jul 2014 09:04:48 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: remove some boilerplate comments

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: reformat header comments
Ian Abbott [Fri, 25 Jul 2014 09:04:47 +0000 (10:04 +0100)]
staging: comedi: amplc_pc236: reformat header comments

Use preferred style for copyright and driver description comments.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove partition information from proc
Benjamin Romer [Fri, 25 Jul 2014 02:55:08 +0000 (22:55 -0400)]
staging: unisys: remove partition information from proc

Debugging information for the guest's channels was being exposed in proc.
Remove the code that creates these entries, which are no longer needed.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: silicom: remove driver
Kristina Martšenko [Thu, 24 Jul 2014 23:30:46 +0000 (02:30 +0300)]
staging: silicom: remove driver

The driver hasn't been cleaned up and it doesn't look like anyone is
working on it anymore (including the original author). So remove it.
If someone wants to work on cleaning the driver up and moving it out of
staging, this commit can be reverted.

In addition, since this removes the CONFIG_NET_VENDOR_SILICOM config
symbol, remove the symbol from all defconfig files that reference it.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: Fix sparse error (signature mismatch)
L. Alberto Giménez [Thu, 24 Jul 2014 22:50:25 +0000 (00:50 +0200)]
staging/lustre: Fix sparse error (signature mismatch)

lprocfs_wr_atomic is defined in
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c with its second argument
with the __user attribute:

int lprocfs_wr_atomic(struct file *file, const char __user *buffer,
              unsigned long count, void *data)

but its declaration in drivers/staging/lustre/lustre/include/lprocfs_status.h does
not include the attribute. Make declaration and definition match.

Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove NULL pointer sparse warning
Guillaume Clement [Thu, 24 Jul 2014 23:06:28 +0000 (01:06 +0200)]
staging: vt6655: Remove NULL pointer sparse warning

We were using 0 instead of NULL to initialize a pointer, which caused
a sparse warning.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove unused macro
Guillaume Clement [Thu, 24 Jul 2014 23:06:27 +0000 (01:06 +0200)]
staging: vt6655: remove unused macro

The MAC_MAX_CONTEXT_SIZE macro was not enclosed into parenthesis,
which might have caused hard to debug errors, and caused a sparse
warning.

Since it is unused, we might as well remove it.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: fix braces at newline in if statements
Guillaume Clement [Thu, 24 Jul 2014 23:06:26 +0000 (01:06 +0200)]
staging: vt6655: fix braces at newline in if statements

Braces should not be in a separate line for multi-line if
statements. This fixes warnings reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove braces for single statements if
Guillaume Clement [Thu, 24 Jul 2014 23:06:25 +0000 (01:06 +0200)]
staging: vt6655: remove braces for single statements if

This fixes several "braces {} are not necessary for single statement
blocks" checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: add missing whitespace
Guillaume Clement [Thu, 24 Jul 2014 23:06:24 +0000 (01:06 +0200)]
staging: vt6655: add missing whitespace

Some whitespace were missing, causing checkpatch warnings and altering
readability.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove unreachable break statements
Guillaume Clement [Thu, 24 Jul 2014 23:06:23 +0000 (01:06 +0200)]
staging: vt6655: Remove unreachable break statements

This fixes break "break is not useful after a goto or return"
checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: break single line if statements
Guillaume Clement [Thu, 24 Jul 2014 23:06:22 +0000 (01:06 +0200)]
staging: vt6655: break single line if statements

This fixes the "trailing statements should be on next line" checkpatch
warning.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Use pr_* functions instead of printk
Guillaume Clement [Thu, 24 Jul 2014 23:06:21 +0000 (01:06 +0200)]
staging: vt6655: Use pr_* functions instead of printk

Lots of printk are used in vt6655, replace them with the pr_*
equivalent.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: fix static position in inline function
Guillaume Clement [Thu, 24 Jul 2014 23:06:20 +0000 (01:06 +0200)]
staging: vt6655: fix static position in inline function

This should be "static inline", not "inline static". Reported by
checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: fix braces at newline for structs
Guillaume Clement [Thu, 24 Jul 2014 23:06:19 +0000 (01:06 +0200)]
staging: vt6655: fix braces at newline for structs

For structs definitions, the braces should be at the end of the
line. Reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: fix function braces not on the proper line
Guillaume Clement [Thu, 24 Jul 2014 23:06:18 +0000 (01:06 +0200)]
staging: vt6655: fix function braces not on the proper line

Function braces should be on a separate line. Reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove spaces before quoted newlines
Guillaume Clement [Thu, 24 Jul 2014 23:06:17 +0000 (01:06 +0200)]
staging: vt6655: Remove spaces before quoted newlines

This fixes several spaces added just before a newline in debug
strings, reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Add missing blank lines after declarations
Guillaume Clement [Thu, 24 Jul 2014 23:06:16 +0000 (01:06 +0200)]
staging: vt6655: Add missing blank lines after declarations

This patch fixes the missing blank lines after declarations in vt6655
reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove useless return statements
Guillaume Clement [Thu, 24 Jul 2014 23:06:15 +0000 (01:06 +0200)]
staging: vt6655: remove useless return statements

Many return statements in void function were present at the end of
functions, with no effect. They now are removed.

This fixes a bunch of checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: wcmd.h remove dead macros
Malcolm Priestley [Thu, 24 Jul 2014 22:34:18 +0000 (23:34 +0100)]
staging: vt6656: wcmd.h remove dead macros

AUTHENTICATE_TIMEOUT
ASSOCIATE_TIMEOUT

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: rf.h cleanup C_PWBT comments
Malcolm Priestley [Thu, 24 Jul 2014 22:34:17 +0000 (23:34 +0100)]
staging: vt6656: rf.h cleanup C_PWBT comments

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: power.h remove dead macros
Malcolm Priestley [Thu, 24 Jul 2014 22:34:16 +0000 (23:34 +0100)]
staging: vt6656: power.h remove dead macros

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: dpc remove unneeded headers
Malcolm Priestley [Thu, 24 Jul 2014 22:34:15 +0000 (23:34 +0100)]
staging: vt6656: dpc remove unneeded headers

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: dpc.h remove dead function prototypes
Malcolm Priestley [Thu, 24 Jul 2014 22:34:14 +0000 (23:34 +0100)]
staging: vt6656: dpc.h remove dead function prototypes

Removing
RXvWorkItem
RXvFreeRCB

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio: convert printk to pr_err
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:05 +0000 (10:15 -0700)]
staging: comedi: ni_tio: convert printk to pr_err

Convert the printk(KERN_ERR ...) in ni_m_clk_src() to a pr_err().

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>
10 years agostaging: comedi: ni_tio: remove forward declarations
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:04 +0000 (10:15 -0700)]
staging: comedi: ni_tio: remove forward declarations

Move some of the functions to remove the need for the forward
declarations.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_set_clock_src() and helpers
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:03 +0000 (10:15 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_set_clock_src() and helpers

Do some renaming of local vars, etc. to tidy up the ugly line breaks
to improve the readability of the code.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_get_clock_src()
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:02 +0000 (10:15 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_get_clock_src()

Remove the static const local variable and add a blank line after
the declarations.

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>
10 years agostaging: comedi: ni_tio: absorb ni_tio_set_first_gate_modifiers()
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:01 +0000 (10:15 -0700)]
staging: comedi: ni_tio: absorb ni_tio_set_first_gate_modifiers()

This function is only called by ni_tio_set_gate_src(). For aesthetics,
absorb the code into that function..

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_set_gate_src() and helpers
H Hartley Sweeten [Thu, 24 Jul 2014 17:15:00 +0000 (10:15 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_set_gate_src() and helpers

Do some renaming of local vars, parameters, etc. to tidy up the ugly
line breaks to improve the readability of the code.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_set_other_src()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:59 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_set_other_src()

Invert the counter_dev->variant test to reduce the indent level of
this function.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_get_gate_src() and helpers
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:58 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_get_gate_src() and helpers

Do some renaming of local vars, parameters, etc. to tidy up the ugly
line breaks to improve the readability of the code.

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>
10 years agostaging: comedi: ni_tio: absorb ni_tio_counter_status()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:57 +0000 (10:14 -0700)]
staging: comedi: ni_tio: absorb ni_tio_counter_status()

This function is only called to handle the INSN_CONFIG_GET_COUNTER_STATUS
instruction. For aesthetics, absorb the code into ni_tio_insn_config().

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_set_sync_mode()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:56 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_set_sync_mode()

Fix the > 80 char line issues in this function.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_660x_source_select_bits()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:55 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_660x_source_select_bits()

Rename a local variable to fix the > 80 char line issues.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_m_series_source_select_bits()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:54 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_m_series_source_select_bits()

Rename a local variable to fix the > 80 char line issues.

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>
10 years agostaging: comedi: ni_tio: rename ni_tio_second_gate_registers_present()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:53 +0000 (10:14 -0700)]
staging: comedi: ni_tio: rename ni_tio_second_gate_registers_present()

For aesthetics, rename this function to shorten some of the long lines.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_tio_init_counter()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:52 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_init_counter()

This function is called to initialize/reset a gpct counter during a
comedi drivers (*attach).

For aesthetics, move this exported function toward the end of the file.

Tidy up the functions a bit by just open coding the '0x0' values used
to initialize some of 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>
10 years agostaging: comedi: ni_tio: tidy up ni_gpct_device_{construct,destroy)()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:51 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_gpct_device_{construct,destroy)()

For aesthetics, move these exported functions to the end of the file.

Tidy up the functions a bit and remove the BUG_ON when (num_counters == 0).

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>
10 years agostaging: comedi: ni_tio: move defines to head of file
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:50 +0000 (10:14 -0700)]
staging: comedi: ni_tio: move defines to head of file

For aesthetics, move all the defines to the head of the file.

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>
10 years agostaging: comedi: ni_tio: tidy up enum ni_660x_clock_source
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:49 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up enum ni_660x_clock_source

These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.

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>
10 years agostaging: comedi: ni_tio: tidy up enum ni_m_series_clock_source
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:48 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up enum ni_m_series_clock_source

These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.

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>
10 years agostaging: comedi: ni_tio: tidy up enum ni_660x_gate_select
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:47 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up enum ni_660x_gate_select

These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.

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>
10 years agostaging: comedi: ni_tio: tidy up enum ni_m_series_gate_select
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:46 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up enum ni_m_series_gate_select

These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.

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>
10 years agostaging: comedi: ni_tio: tidy up enum ni_660x_second_gate_select
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:45 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up enum ni_660x_second_gate_select

These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.

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>
10 years agostaging: comedi: ni_tio: remove counter_status_mask
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:44 +0000 (10:14 -0700)]
staging: comedi: ni_tio: remove counter_status_mask

For aesthetics, remove this global static const varaible.

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>
10 years agostaging: comedi: ni_tio: convert global static const variables to defines
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:43 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert global static const variables to defines

For aesthetics, convert the global static const varaibles into defines.

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>
10 years agostaging: comedi: ni_tio: convert NI_660x_Up_Down_Pin_Second_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:42 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_Up_Down_Pin_Second_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_660x_RTSI_Second_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:41 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_RTSI_Second_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_660x_RTSI_Clock() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:40 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_RTSI_Clock() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_660x_Source_Pin_Clock() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:39 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_Source_Pin_Clock() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_M_Series_PFI_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:38 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_M_Series_PFI_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_M_Series_RTSI_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:37 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_M_Series_RTSI_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_660x_RTSI_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:36 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_RTSI_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_660x_Gate_Pin_Gate_Select() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:35 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_660x_Gate_Pin_Gate_Select() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_M_Series_PFI_Clock() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:34 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_M_Series_PFI_Clock() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: convert NI_M_Series_RTSI_Clock() to a macro
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:33 +0000 (10:14 -0700)]
staging: comedi: ni_tio: convert NI_M_Series_RTSI_Clock() to a macro

The BUG_ON() in this function can never happen.

For aesthetics, rename this CamelCase inline function and convert it into
a simple 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>
10 years agostaging: comedi: ni_tio: tidy up ni_660x_set_first_gate()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:32 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_660x_set_first_gate()

Rename some of the local vars and tidy up this function to fix to
fix a couple > 80 char line issues.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_m_series_set_first_gate()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:31 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_m_series_set_first_gate()

Rename some of the local vars and tidy up this function to fix to
fix a couple > 80 char line issues.

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>
10 years agostaging: comedi: ni_tio: tidy up ni_660x_set_second_gate()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:30 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up ni_660x_set_second_gate()

Rename some of the local vars and tidy up this function to fix to
fix a couple > 80 char line issues.

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>
10 years agostaging: comedi: ni_tio: remove unnecessary ni_gpct_variant BUG() cases
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:29 +0000 (10:14 -0700)]
staging: comedi: ni_tio: remove unnecessary ni_gpct_variant BUG() cases

The enum ni_gpct_variant is used to handle hardware variations in the
gpct timers handled by this driver. This enum is defined as:

enum ni_gpct_variant {
ni_gpct_variant_e_series,
ni_gpct_variant_m_series,
ni_gpct_variant_660x
};

For all the switch statements where all three enum values are handled,
remove the unreachable BUG(). Move the default case so it is handled
the same as ni_gpct_variant_e_series.

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>
10 years agostaging: comedi: ni_tio: tidy up some function declarations
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:28 +0000 (10:14 -0700)]
staging: comedi: ni_tio: tidy up some function declarations

Fix the whitespace in some of the function declarations to avoid
the ugly line breaks and fix a couple checkpatch.pl issues:

WARNING: line over 80 characters
WARNING: Unnecessary space before function pointer arguments

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>
10 years agostaging: comedi: ni_tio: fix > 80 char comments
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:27 +0000 (10:14 -0700)]
staging: comedi: ni_tio: fix > 80 char comments

Tidy up some of the comments to fix some fo the the checkpatch.pl
warnings:

WARNING: line over 80 characters

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>
10 years agostaging: comedi: ni_tio: fix ni_tio_insn_read()
H Hartley Sweeten [Thu, 24 Jul 2014 17:14:26 +0000 (10:14 -0700)]
staging: comedi: ni_tio: fix ni_tio_insn_read()

The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values read.

Fix this function to work line the core expects.

For aesthetics, factor out the code that reads the SM_Save_Reg.

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>
10 years agostaging: vt6656: rf.h clean up comments
Malcolm Priestley [Fri, 25 Jul 2014 19:51:56 +0000 (20:51 +0100)]
staging: vt6656: rf.h clean up comments

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>