firefly-linux-kernel-4.4.55.git
12 years agostaging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len
Devendra Naga [Sat, 7 Jul 2012 12:05:16 +0000 (17:35 +0530)]
staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len

as the if else statements enclose only one line, so braces around them are not
needed.

The following warning is fixed

drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:100: WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: fix sparse warning about the kernel thread handler function
Devendra Naga [Sat, 7 Jul 2012 12:05:15 +0000 (17:35 +0530)]
staging/ft1000: fix sparse warning about the kernel thread handler function

sparse throws warning about the ft1000_poll_thread as

drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:40:5: warning: symbol 'ft1000_poll_thread' was not declared. Should it be static?

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: fix sparse warning
Devendra Naga [Sat, 7 Jul 2012 12:05:14 +0000 (17:35 +0530)]
staging/ft1000: fix sparse warning

sparse warns about having 0 assigned to a pointer,
fix it up by using NULL.

The following sparse warning is fixed

drivers/staging/ft1000/ft1000-usb/ft1000_debug.c:170:52: warning: Using plain integer as NULL pointer

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: fix the no brace needed warning in ft1000_interrupt
Devendra Naga [Sat, 7 Jul 2012 12:05:12 +0000 (17:35 +0530)]
staging/ft1000: fix the no brace needed warning in ft1000_interrupt

as the if statement encloses only one line braces around it are not
needed.

The following warn fixed,
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: fix single statements block warning
Devendra Naga [Sat, 7 Jul 2012 06:03:04 +0000 (11:33 +0530)]
staging/rts_pstor: fix single statements block warning

The following warning is fixed up.
drivers/staging/rts_pstor/sd.c:190: WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: fix the no brace needed warning
Devendra Naga [Sat, 7 Jul 2012 06:02:15 +0000 (11:32 +0530)]
staging/rts_pstor: fix the no brace needed warning

for if else statements having single block no braces are needed
fixed the following checkpatch warning

drivers/staging/rts_pstor/sd.c:140: WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: iwctl: remove a few remaining redundant newlines
Jesper Juhl [Sun, 8 Jul 2012 22:59:30 +0000 (00:59 +0200)]
staging: vt6656: iwctl: remove a few remaining redundant newlines

I missed a few redundant newlines the first time.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: iwctl: Fix up a few remaining brace issues
Jesper Juhl [Sun, 8 Jul 2012 22:58:52 +0000 (00:58 +0200)]
staging: vt6656: iwctl: Fix up a few remaining brace issues

My previous cleanup patches missed a few cases of
redundant/missing/replaced curly braces. This should fix up the last
ones.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by : Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: iwctl: fix up spacing around operators
Jesper Juhl [Sun, 8 Jul 2012 22:58:36 +0000 (00:58 +0200)]
staging: vt6656: iwctl: fix up spacing around operators

A few cases were missed in my previous cleanup, this takes care of the
last cases of missing space (or too much space (as in a newline))
around operators ('=', '==', ',', '<').

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: add mapping modes
Seth Jennings [Mon, 2 Jul 2012 21:15:52 +0000 (16:15 -0500)]
staging: zsmalloc: add mapping modes

This patch improves mapping performance in zsmalloc by getting
usage information from the user in the form of a "mapping mode"
and using it to avoid unnecessary copying for objects that span
pages.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: add details to zs_map_object boiler plate
Seth Jennings [Mon, 2 Jul 2012 21:15:51 +0000 (16:15 -0500)]
staging: zsmalloc: add details to zs_map_object boiler plate

Add information on the usage limits of zs_map_object()

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: add single-page object fastpath in unmap
Seth Jennings [Mon, 2 Jul 2012 21:15:50 +0000 (16:15 -0500)]
staging: zsmalloc: add single-page object fastpath in unmap

Improve zs_unmap_object() performance by adding a fast path for
objects that don't span pages.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: remove x86 dependency
Seth Jennings [Mon, 2 Jul 2012 21:15:49 +0000 (16:15 -0500)]
staging: zsmalloc: remove x86 dependency

This patch replaces the page table assisted object mapping
method, which has x86 dependencies, with a arch-independent
method that does a simple copy into a temporary per-cpu
buffer.

While a copy seems like it would be worse than mapping the pages,
tests demonstrate the copying is always faster and, in the case of
running inside a KVM guest, roughly 4x faster.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: cleanup the code between tmem_obj_init and tmem_obj_find
Xiao Guangrong [Tue, 26 Jun 2012 08:52:50 +0000 (16:52 +0800)]
staging: zcache: cleanup the code between tmem_obj_init and tmem_obj_find

tmem_obj_find and insertion tmem-obj have the some logic, we can integrate
the code

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: introduce get_zcache_client
Xiao Guangrong [Tue, 26 Jun 2012 08:52:17 +0000 (16:52 +0800)]
staging: zcache: introduce get_zcache_client

Introduce get_zcache_client to remove the common code

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: cleanup zcache_do_preload and zcache_put_page
Xiao Guangrong [Tue, 26 Jun 2012 08:51:55 +0000 (16:51 +0800)]
staging: zcache: cleanup zcache_do_preload and zcache_put_page

Cleanup the code for zcache_do_preload and zcache_put_page

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: optimize zcache_do_preload
Xiao Guangrong [Tue, 26 Jun 2012 08:51:34 +0000 (16:51 +0800)]
staging: zcache: optimize zcache_do_preload

zcache_do_preload is called in zcache_put_page where IRQ is disabled, so, need
not care preempt

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: cleanup zbud_init
Xiao Guangrong [Tue, 26 Jun 2012 08:51:10 +0000 (16:51 +0800)]
staging: zcache: cleanup zbud_init

Need not set global parameters to 0

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: mark zbud_init/zcache_comp_init as __init
Xiao Guangrong [Tue, 26 Jun 2012 08:50:50 +0000 (16:50 +0800)]
staging: zcache: mark zbud_init/zcache_comp_init as __init

These functions are called only when system is initializing, so mark __init
for them to free memory

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: remove unnecessary config option dependence
Xiao Guangrong [Tue, 26 Jun 2012 08:50:31 +0000 (16:50 +0800)]
staging: zcache: remove unnecessary config option dependence

zcache is enabled only if one of CONFIG_CLEANCACHE and CONFIG_FRONTSWAP is
enabled, see the Kconfig:
depends on (CLEANCACHE || FRONTSWAP) && CRYPTO=y && X86
So, we can remove the check in the source code

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: fix a compile warning
Xiao Guangrong [Tue, 26 Jun 2012 08:50:10 +0000 (16:50 +0800)]
staging: zcache: fix a compile warning

Fix:

drivers/staging/zcache/zcache-main.c: In function ‘zcache_comp_op’:
drivers/staging/zcache/zcache-main.c:112:2: warning: ‘ret’ may be used uninitial

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: fix refcount leak
Xiao Guangrong [Tue, 26 Jun 2012 08:49:46 +0000 (16:49 +0800)]
staging: zcache: fix refcount leak

In zcache_get_pool_by_id, the refcount of zcache_host is not increased, but
it is always decreased in zcache_put_pool

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: CSR: fix function declaration warnings
Emil Goode [Sat, 7 Jul 2012 18:44:49 +0000 (20:44 +0200)]
staging: CSR: fix function declaration warnings

Sparse is warning about non-ANSI function declaration.
Add void to the parameterless function.

drivers/staging/csr/csr_wifi_hip_chiphelper.c:633:31: warning:
non-ANSI function declaration of function 'ChipHelper_Null'

I also fixed this checkpatch error:
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ccg: print MAC addresses via %pM
Andy Shevchenko [Fri, 6 Jul 2012 15:39:47 +0000 (18:39 +0300)]
staging: ccg: print MAC addresses via %pM

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx: use %pM for MAC
Andy Shevchenko [Fri, 6 Jul 2012 15:28:15 +0000 (18:28 +0300)]
staging: gdm72xx: use %pM for MAC

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: use %pM for BSSID
Andy Shevchenko [Fri, 6 Jul 2012 15:28:16 +0000 (18:28 +0300)]
staging: vt6655: use %pM for BSSID

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: use %pM for the BSSID
Andy Shevchenko [Fri, 6 Jul 2012 15:28:17 +0000 (18:28 +0300)]
staging: vt6656: use %pM for the BSSID

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: print MAC addresses via %pM
Andy Shevchenko [Fri, 6 Jul 2012 15:28:14 +0000 (18:28 +0300)]
staging: csr: print MAC addresses via %pM

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: bcm: use %pM to print MAC addresses
Andy Shevchenko [Fri, 6 Jul 2012 15:28:13 +0000 (18:28 +0300)]
staging: bcm: use %pM to print MAC addresses

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: vme: silence a Sparse warning
Dan Carpenter [Fri, 6 Jul 2012 08:21:49 +0000 (11:21 +0300)]
Staging: vme: silence a Sparse warning

Sparse complains that "arg" is not a __user pointer.  The "argp" and
"arg" variables are equivalent but argp is declared as a __user pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoDrivers: Staging: ccg: Made checkpatch.pl clean
David Murray [Fri, 6 Jul 2012 14:20:43 +0000 (09:20 -0500)]
Drivers: Staging: ccg: Made checkpatch.pl clean

Fixed a tiny checkpatch.pl warning.

Signed-off-by: David Murray <therealcykey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/devices/ipoctal: save IRQ vector in MEM space
Samuel Iglesias Gonsálvez [Wed, 4 Jul 2012 14:11:10 +0000 (16:11 +0200)]
Staging: ipack/devices/ipoctal: save IRQ vector in MEM space

The IRQ vector should be saved in MEM space base address according to the
datasheet.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: main_usb.c: Remove useless macros
Marcos Paulo de Souza [Tue, 3 Jul 2012 02:59:30 +0000 (23:59 -0300)]
staging: vt6656: main_usb.c: Remove useless macros

All these macros are not used. So, remove this all.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging "telephony" Fix typos.
Justin P. Mattock [Mon, 2 Jul 2012 14:44:41 +0000 (07:44 -0700)]
staging "telephony" Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: fix minor coding style problem
Devendra Naga [Sun, 1 Jul 2012 18:01:35 +0000 (23:31 +0530)]
staging/ft1000: fix minor coding style problem

this following warn is fixed up

drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1754:
ERROR: open brace '{' following function declarations go on the next line

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: dynamically allocate my_sym_buf in dload_symbols
Omar Ramirez Luna [Fri, 29 Jun 2012 18:49:20 +0000 (13:49 -0500)]
staging: tidspbridge: dynamically allocate my_sym_buf in dload_symbols

Dynamically allocate my_sym_buf to silence the following warning:

drivers/staging/tidspbridge/dynload/cload.c:
    In function 'dload_symbols':
drivers/staging/tidspbridge/dynload/cload.c:890:
    warning: the frame size of 1040 bytes is larger than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: dynamically allocate ibuf in dload_data
Omar Ramirez Luna [Fri, 29 Jun 2012 18:49:19 +0000 (13:49 -0500)]
staging: tidspbridge: dynamically allocate ibuf in dload_data

Dynamically allocate ibuf to silence the following warning:

drivers/staging/tidspbridge/dynload/cload.c:
    In function 'dload_data':
drivers/staging/tidspbridge/dynload/cload.c:1337:
    warning: the frame size of 1216 bytes is larger than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: split bridge_io_on_loaded
Omar Ramirez Luna [Fri, 29 Jun 2012 18:49:18 +0000 (13:49 -0500)]
staging: tidspbridge: split bridge_io_on_loaded

Due to its size, this function declares too many variables,
to split it a new structure has been declared to hold values
as they are read from the baseimage.

While at it, indentation was reduced by renaming variables
and reducing blocks of code with the following structure:

if (success) {
    ...
    if (success)
        ...
}

This fixes the following warning:
drivers/staging/tidspbridge/core/io_sm.c:
In function 'bridge_io_on_loaded':
drivers/staging/tidspbridge/core/io_sm.c:777:
warning: the frame size of 1032 bytes is larger
than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: add pud code
Omar Ramirez Luna [Fri, 29 Jun 2012 18:49:17 +0000 (13:49 -0500)]
staging: tidspbridge: add pud code

And fix the following warning for passing an incorrect
variable type.

../tiomap3430.c: In function 'user_va2_pa':
../tiomap3430.c:1555:
    warning: passing argument 1 of 'pmd_offset' from
    incompatible pointer type
arch/arm/include/asm/pgtable-2level.h:156:
    note: expected 'struct pud_t *' but argument is of
    type 'pmdval_t (*)[2]'

While at it, eliminate 'if' nesting to increase readability.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: sep_crypto.c: Remove useless functions sep_dump and sep_dump_sg
Marcos Paulo de Souza [Fri, 29 Jun 2012 04:19:23 +0000 (01:19 -0300)]
staging: sep: sep_crypto.c: Remove useless functions sep_dump and sep_dump_sg

These two functions only has commented code, so remove it.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: sep_crypto.c: Remove useless function crypto_sep_dump_message
Marcos Paulo de Souza [Fri, 29 Jun 2012 04:19:22 +0000 (01:19 -0300)]
staging: sep: sep_crypto.c: Remove useless function crypto_sep_dump_message

The function crypto_sep_dump_message don't have any use in this driver. So remove it.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess()
Johannes Thumshirn [Wed, 27 Jun 2012 19:26:03 +0000 (21:26 +0200)]
staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_midi_postprocess()

Changed a call to strict_strtoul() into kstrtou8() in
pod_set_midi_postprocess().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel()
Johannes Thumshirn [Wed, 27 Jun 2012 19:26:02 +0000 (21:26 +0200)]
staging: line6: Changed strict_strtoul() to kstrtou8() in pod_set_channel()

Changed strict_strtoul() to kstrtou() in pod_set_channel() to take changes in
pod_send_channel() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve()
Johannes Thumshirn [Wed, 27 Jun 2012 19:26:01 +0000 (21:26 +0200)]
staging: line6: Exchanged strict_strtoul with kstrtou8() in pod.c:pod_resolve()

Exchanged call to strict_strtoul() with kstrtou8() in pod_resolve().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: control.c eliminate strict_strtoul() in pod_set_param_int()
Johannes Thumshirn [Wed, 27 Jun 2012 19:26:00 +0000 (21:26 +0200)]
staging: line6: control.c eliminate strict_strtoul() in pod_set_param_int()

Exchange strict_strtoul() with kstrtou8() and make "value" a u8 instead of a
unsigned long. This is also needed for the changed
line6_pod_transmit_parameter().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: changed interface of pod_send_channel()
Johannes Thumshirn [Wed, 27 Jun 2012 19:25:59 +0000 (21:25 +0200)]
staging: line6: changed interface of pod_send_channel()

Adjusted interface of pod_send_channel() in order to take changes of
line6_send_program() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: adjusted interface of line6_send_program()
Johannes Thumshirn [Wed, 27 Jun 2012 19:25:58 +0000 (21:25 +0200)]
staging: line6: adjusted interface of line6_send_program()

Adjusted interface of line6_send_program() to clarify internal working

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: changed interface of line6_pod_transmit_parameter()
Johannes Thumshirn [Wed, 27 Jun 2012 19:25:57 +0000 (21:25 +0200)]
staging: line6: changed interface of line6_pod_transmit_parameter()

Adjusted interface of line6_pod_transmit_parameter() to take changes of
line6_transmit_parameter() into account

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: Changed some strict_strtouls to kstrtou8
Johannes Thumshirn [Wed, 27 Jun 2012 19:25:56 +0000 (21:25 +0200)]
staging: line6: Changed some strict_strtouls to kstrtou8

Adjusted strict_strtoul calls to kstrtou8 in order to take the changes of
line6_transmit_parameter() into account.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: changed interface of line6_transmit_parameter()
Johannes Thumshirn [Wed, 27 Jun 2012 19:25:55 +0000 (21:25 +0200)]
staging: line6: changed interface of line6_transmit_parameter()

Interface of line6_transmit_parameter() adjusted to clarify internal workings

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: update TODO
Rob Clark [Wed, 27 Jun 2012 20:11:38 +0000 (15:11 -0500)]
staging: drm/omap: update TODO

Update TODO file, which had been neglected.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.c: correct indentation to use tabs rather than spaces
Jesper Juhl [Wed, 27 Jun 2012 20:03:30 +0000 (22:03 +0200)]
staging: vt6656: int.c: correct indentation to use tabs rather than spaces

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.c: We don't use spaces between a cast and the variable being...
Jesper Juhl [Wed, 27 Jun 2012 20:02:48 +0000 (22:02 +0200)]
staging: vt6656: int.c: We don't use spaces between a cast and the variable being converted

Remove spaces between casts and variables from
drivers/staging/vt6656/int.c .

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.c: Use one space between variable type and name
Jesper Juhl [Wed, 27 Jun 2012 20:02:19 +0000 (22:02 +0200)]
staging: vt6656: int.c: Use one space between variable type and name

The style of most kernel code is that there is 1 *space* between the
type of a variable and its name. This patch enforces that in
drivers/staging/vt6656/int.c .

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.c: Remove unneeded cast
Jesper Juhl [Wed, 27 Jun 2012 20:01:47 +0000 (22:01 +0200)]
staging: vt6656: int.c: Remove unneeded cast

When assigning a void* to a variable <of some other type>, the value
is cast implicitly - there's no need for explicit cast.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.c: Put comment about DEBUG print define on same line as code
Jesper Juhl [Wed, 27 Jun 2012 20:01:18 +0000 (22:01 +0200)]
staging: vt6656: int.c: Put comment about DEBUG print define on same line as code

A small comment at the end of the line, mentioning the debug level, is
enough - no need to repeat the entire line of code just for that.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int.h: Fix indentation and spacing
Jesper Juhl [Wed, 27 Jun 2012 20:00:41 +0000 (22:00 +0200)]
staging: vt6656: int.h: Fix indentation and spacing

We use tabs for indentation and once space between variable types and
variable name.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: int: Redundant blank line removal
Jesper Juhl [Wed, 27 Jun 2012 20:00:14 +0000 (22:00 +0200)]
staging: vt6656: int: Redundant blank line removal

This trivial cleanup patch removes some completely redundant blank
lines from drivers/staging/vt6656/int.[ch]

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sm7xxfb: erase hardcode cast between smtcfb_info and fb_info
Javier M. Mellid [Wed, 27 Jun 2012 12:10:15 +0000 (14:10 +0200)]
staging: sm7xxfb: erase hardcode cast between smtcfb_info and fb_info

This patch erases hardcode cast between smtcfb_info and fb_info in order
to get a more robust and less rigid smtcfb_info structure. fb_info
doesn't need to be the first field in smtcfb_info after this patch.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sm7xxfb: rename vars holding device and revision ids
Javier M. Mellid [Wed, 27 Jun 2012 12:10:14 +0000 (14:10 +0200)]
staging: sm7xxfb: rename vars holding device and revision ids

This patch fixes CamelCase var names in smtcfb_info holding device and
revision identifiers.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: echo: One variable per line
Jesper Juhl [Wed, 27 Jun 2012 20:28:55 +0000 (22:28 +0200)]
Staging: echo: One variable per line

Our convention is one (statement and) variable per line. Enforce
this in drivers/staging/echo/echo.[ch] .

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge branch 'togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Fri, 6 Jul 2012 23:03:44 +0000 (16:03 -0700)]
Merge branch 'togreg' of git://git./linux/kernel/git/jic23/iio into staging-next

12 years agoMerge branch 'fixes-togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Fri, 6 Jul 2012 23:01:20 +0000 (16:01 -0700)]
Merge branch 'fixes-togreg' of git://git./linux/kernel/git/jic23/iio into staging-next

12 years agostaging: comedi: s626: fix the number of dio channels
H Hartley Sweeten [Mon, 2 Jul 2012 21:26:24 +0000 (14:26 -0700)]
staging: comedi: s626: fix the number of dio channels

The first digital i/o subdevice has its n_chan set to S626_DIO_CHANNELS
which is defined as 48. This is actually the total number of channels
provided by all three digital i/o subdevices. Each subdevice only has
16 channels.

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>
12 years agostaging: comedi: dmm32at: remove skel driver cut-and-paste comments
H Hartley Sweeten [Tue, 3 Jul 2012 01:15:02 +0000 (18:15 -0700)]
staging: comedi: dmm32at: remove skel driver cut-and-paste comments

Remove the cut-and-paste comments from the skel 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>
12 years agostaging: comedi: dmm32at: remove devpriv macro
H Hartley Sweeten [Tue, 3 Jul 2012 01:14:27 +0000 (18:14 -0700)]
staging: comedi: dmm32at: remove devpriv macro

The 'devpriv' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable. Replace
the macro with a local variable where used.

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>
12 years agostaging: comedi: dmm32at: remove unneeded boardinfo variables
H Hartley Sweeten [Tue, 3 Jul 2012 01:13:53 +0000 (18:13 -0700)]
staging: comedi: dmm32at: remove unneeded boardinfo variables

Like most of the comedi drivers, this one appears to have been started
based on the skel driver. Cut-and-paste from that driver has resulted
in an unnecessarily complex boardinfo struct.

Remove everything from the boardinfo struct, except the 'name', and
just use the open coded values in 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>
12 years agostaging: comedi: dmm32at: remove dmm_outb macro
H Hartley Sweeten [Tue, 3 Jul 2012 01:13:11 +0000 (18:13 -0700)]
staging: comedi: dmm32at: remove dmm_outb macro

The macro is just a wrapper for outb(). Just use the outb() directly.

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>
12 years agostaging: comedi: dmm32at: remove dmm_inb macro
H Hartley Sweeten [Tue, 3 Jul 2012 01:12:35 +0000 (18:12 -0700)]
staging: comedi: dmm32at: remove dmm_inb macro

The macro is just a wrapper for inb(). Just use the inb() directly.

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>
12 years agostaging: comedi: dmm32at: remove forward declarations 2
H Hartley Sweeten [Tue, 3 Jul 2012 01:11:56 +0000 (18:11 -0700)]
staging: comedi: dmm32at: remove forward declarations 2

Move the dmm32at_ns_to_timer() and dmm32at_setaitimer() functions
to remove the need for the remaining forward declarations.

Also, make dmm32at_setaitimer() static, it's only referenced in
this file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dmm32at: remove forward declarations 1
H Hartley Sweeten [Tue, 3 Jul 2012 01:11:23 +0000 (18:11 -0700)]
staging: comedi: dmm32at: remove forward declarations 1

Move the attach/detach functions as well as the boardinfo variable
to remove the need to most of the forward declarations.

Add some whitespace to the boardinfo during the move.

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>
12 years agostaging: comedi: dmm32at: use module_comedi_driver
H Hartley Sweeten [Tue, 3 Jul 2012 01:10:46 +0000 (18:10 -0700)]
staging: comedi: dmm32at: use module_comedi_driver

Convert driver to use the module_comedi_driver() macro to remove
some of the boilerplate.

Move the comedi_driver variable to the end of the file to keep it
with the module_comedi_driver() macro. This also removes the need
for some of the forward declarations. While moving the variable:

1) strip out the unnecessary cut-and-paste skel driver comments
2) add whitespace to improve the readability
3) rename the variable from driver* to *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>
12 years agostaging: comedi: das08_cs: remove thisboard macro
H Hartley Sweeten [Mon, 2 Jul 2012 22:48:58 +0000 (15:48 -0700)]
staging: comedi: das08_cs: remove thisboard macro

The 'thisboard' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable. Replace
the macro with a local variable where used. Use the comedi_board()
helper to get the pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: move the comedi_driver variable
H Hartley Sweeten [Mon, 2 Jul 2012 22:48:26 +0000 (15:48 -0700)]
staging: comedi: das08_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: refactor the pcmcia probe/remove
H Hartley Sweeten [Mon, 2 Jul 2012 22:47:47 +0000 (15:47 -0700)]
staging: comedi: das08_cs: refactor the pcmcia probe/remove

Move the pcmcia_disable_device() call where needed in the pcmcia
probe/remove and delete the das08_pcmcia_release() function.

Move the logic of the das08_pcmcia_config() directly into the
probe function and properly return an error code when the config
fails.

Only set cur_dev, used by the comedi_driver, if the pcmcia probe
is successful. Also, make sure to NULL it in the remove.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: remove unneeded pcmcia private data
H Hartley Sweeten [Mon, 2 Jul 2012 22:47:14 +0000 (15:47 -0700)]
staging: comedi: das08_cs: remove unneeded pcmcia private data

The pcmcia device-specific data is no longer needed by this driver.
Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: remove the pcmcia suspend/resume
H Hartley Sweeten [Mon, 2 Jul 2012 22:46:40 +0000 (15:46 -0700)]
staging: comedi: das08_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: remove unused pcmcia 'stop' logic
H Hartley Sweeten [Mon, 2 Jul 2012 22:46:08 +0000 (15:46 -0700)]
staging: comedi: das08_cs: remove unused pcmcia 'stop' logic

The pcmcia support code in this driver is cut-and-paste from the
dummy_cs.c driver of the Linux PCMCIA Card Services package. 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: refactor the pcmcia support code
H Hartley Sweeten [Mon, 2 Jul 2012 22:45:34 +0000 (15:45 -0700)]
staging: comedi: das08_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: cleanup and remove useless comments
H Hartley Sweeten [Mon, 2 Jul 2012 22:45:03 +0000 (15:45 -0700)]
staging: comedi: das08_cs: cleanup and remove useless comments

Move the comment about the PCMCIA support and reword it a bit
because of the move.

Remove a number of useless 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>
12 years agostaging: comedi: das08_cs: cleanup the pcmcia_driver declaration
H Hartley Sweeten [Mon, 2 Jul 2012 22:44:30 +0000 (15:44 -0700)]
staging: comedi: das08_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 'das08_cs_driver' is only referenced in this file,
make it static. This quiets the following sparse warning:

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

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>
12 years agostaging: comedi: das08_cs: change driver registration order
H Hartley Sweeten [Mon, 2 Jul 2012 22:43:52 +0000 (15:43 -0700)]
staging: comedi: das08_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 if it fails.

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>
12 years agostaging: comedi: das08_cs: consolidate the init and exit functions
H Hartley Sweeten [Mon, 2 Jul 2012 22:43:19 +0000 (15:43 -0700)]
staging: comedi: das08_cs: consolidate the init and exit functions

The register/unregister of the pcmcia driver is done in 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das08_cs: move the MODULE_* stuff to the EOF
H Hartley Sweeten [Mon, 2 Jul 2012 22:42:41 +0000 (15:42 -0700)]
staging: comedi: das08_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: das_08: absorb i8254_struct into the private data
H Hartley Sweeten [Fri, 29 Jun 2012 18:02:59 +0000 (11:02 -0700)]
staging: comedi: das_08: absorb i8254_struct into the private data

The i8254_struct now only contains the iobase address used to
read/write the 8254 timer device. Move that variable into the
das08 private data struct and remove the i8254_struct.

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>
12 years agostaging: comedi: das_08: remove the unneeded 8254 variables and defines
H Hartley Sweeten [Fri, 29 Jun 2012 18:02:02 +0000 (11:02 -0700)]
staging: comedi: das_08: remove the unneeded 8254 variables and defines

Now that the driver is using the 8253 helper functions, remove the
unused variables in the i8254_struct as well as the unused defines
for the 8254 register offsets.

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>
12 years agostaging: comedi: das_08: remove the 8254 'channels' usage
H Hartley Sweeten [Fri, 29 Jun 2012 18:01:22 +0000 (11:01 -0700)]
staging: comedi: das_08: remove the 8254 'channels' usage

The internal 8254 'channels' count is the same as the comedi
subdevice 'n_chan'. There is no need to keep the internal
count.

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>
12 years agostaging: comedi: das_08: remove the 8254 'logic2phys' usage
H Hartley Sweeten [Fri, 29 Jun 2012 18:00:40 +0000 (11:00 -0700)]
staging: comedi: das_08: remove the 8254 'logic2phys' usage

The three 8254 timers have a 1:1 relationship to the comedi
channels. The 'logic2phys' usage just makes the driver more
complex.

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>
12 years agostaging: comedi: das_08: remove the cached 8254 'mode'
H Hartley Sweeten [Fri, 29 Jun 2012 17:59:55 +0000 (10:59 -0700)]
staging: comedi: das_08: remove the cached 8254 'mode'

The driver initially sets all the cached 'mode' values for the
8254 timers to (I8254_MODE0 | I8254_BINARY). It then sets the
timers to that 'mode'. Configuring the counters with the comedi
INSN_CONFIG_SET_COUNTER_MODE updates the 'mode' and then sets
the timers to the 'mode'. The cached value is never read or
used other than for storage.

Just remove the 'mode' usage as it serves no purpose.

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>
12 years agostaging: comedi: das_08: unwind the 8254 timer support
H Hartley Sweeten [Fri, 29 Jun 2012 17:59:21 +0000 (10:59 -0700)]
staging: comedi: das_08: unwind the 8254 timer support

Refactor the 8254 timer support by removing the various functions
that handle the io and consolidating the logic into the initialize,
read, write, and config functions used by the 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>
12 years agostaging: comedi: das_08: use the 8253 helper functions
H Hartley Sweeten [Fri, 29 Jun 2012 17:58:41 +0000 (10:58 -0700)]
staging: comedi: das_08: use the 8253 helper functions

Instead of open-coding the 8254 timer io, use the helper functions
provided by 8253.h.

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>
12 years agostaging: comedi: ni_670x: removve unused 'ao_bits'
H Hartley Sweeten [Sat, 30 Jun 2012 00:41:47 +0000 (17:41 -0700)]
staging: comedi: ni_670x: removve unused 'ao_bits'

All the NI 670x boards have 16-bit anaolog output DACs. The
'ao_bits' in the boardinfo is not used so remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_670x: cleanup ni_670x_dio_insn_bits()
H Hartley Sweeten [Sat, 30 Jun 2012 00:41:10 +0000 (17:41 -0700)]
staging: comedi: ni_670x: cleanup ni_670x_dio_insn_bits()

Add local variable for the io_addr, mask. and bits used in this
function so that the comments are not needed and the writel/readl
calls are a bit cleaner.

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>
12 years agostaging: comedi: ni_670x: cleanup the boardinfo
H Hartley Sweeten [Sat, 30 Jun 2012 00:40:23 +0000 (17:40 -0700)]
staging: comedi: ni_670x: cleanup the boardinfo

For aesthetic reasons, reorder the boardinfo struct so that the
'name' pointer is first. Also, add some 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>
12 years agostaging: comedi: ni_670x: fix dereference of an invalid pointer
H Hartley Sweeten [Sat, 30 Jun 2012 00:39:45 +0000 (17:39 -0700)]
staging: comedi: ni_670x: fix dereference of an invalid pointer

The attach if this driver can fail before the subdevices are
allocated. If the attach fails the comedi core will call the
detach routine to allow the driver to do it's cleanup.

We need to make sure that the subdevice allocation was successful
before trying to dereference subdevice[0] to free the allocated
range table list.

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>
12 years agostaging: comedi: ni_670x: return '0' for successful attach
H Hartley Sweeten [Sat, 30 Jun 2012 00:38:54 +0000 (17:38 -0700)]
staging: comedi: ni_670x: return '0' for successful attach

The comedi core expects a < 0 value during the attach to indicate
an error. The normal 'success' return for the kernel is '0' so use
that here.

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>
12 years agostaging: comedi: ni_670x: change printk's to cleaned up dev_printk's
H Hartley Sweeten [Sat, 30 Jun 2012 00:38:18 +0000 (17:38 -0700)]
staging: comedi: ni_670x: change printk's to cleaned up dev_printk's

Convert all the prink's in this file to dev_prink's.

Change the INFO message in ni_670x_find_device into a dev_warn().
This message is only displayed if a matching device was not found.
A warning is more appropriate here than info.

Consolidate the attach messages into one dev_info() output after
the successful attach.

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>
12 years agostaging: comedi: ni_670x: remove n_ni_670x_boards macro
H Hartley Sweeten [Sat, 30 Jun 2012 00:37:25 +0000 (17:37 -0700)]
staging: comedi: ni_670x: remove n_ni_670x_boards macro

This macro is simply the ARRAY_SIZE() of the boardinfo. Just use
the ARRAY_SIZE and remove the macro.

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>
12 years agostaging: comedi: ni_670x: remove thisboard and devpriv macros
H Hartley Sweeten [Sat, 30 Jun 2012 00:36:45 +0000 (17:36 -0700)]
staging: comedi: ni_670x: 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>
12 years agostaging: comedi: ni_670x: remove forward declarations
H Hartley Sweeten [Sat, 30 Jun 2012 00:36:09 +0000 (17:36 -0700)]
staging: comedi: ni_670x: remove forward declarations

Move the attach and detach 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>