Commit graph

20626 commits

Author SHA1 Message Date
Greg Kroah-Hartman
9908b4f32f Fifth round of IIO new drivers, cleanups and functionality for the 3.13 cycle.
New Driver
 * Freescale mag3110 magnetometer driver.
 
 New functionality
 * Add LPS001WP support to the ST pressure driver.
 * Allow the max1363 driver to use only smbus functions for 8 bit devices. This
   allows the driver to be used when more extensive i2c support is not
   available.
 
 Cleanups
 * Fix incorrect description of unit conversions in ak8975.
 * Switch to pr_err in industrialio-core.c instead of direct printk calls.
 * Some simple redundant error handling removal patches.
 * Trivial warning suppression by adding brackets to a sizeof call.
 * Drop redundant of_match_ptr casts in drivers that are dependent on
   OF supporting being present.  The only purpose of the of_match_ptr
   wrapper was to make stubbing out of the relevant structures trivial.
 
 Fixes
 * Make MXS_LRADC depend on INPUT to avoid compile failures. This fixes an
   issue introduced in the previous pull in this cycle.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSbWN/AAoJEFSFNJnE9BaIlVgP/2Tq5rfAfM3ErvHY5GMuSiRi
 VTMntdvQ4YVqMln8ZZy70p5mAeLtI84Q5d4/qBihPNiBrDT7YMr0CoSiOv+JaJxc
 Nn4cjMGV8Y7TokH6gXD96Ye8AvS1nnxgytJLBbELOMvBsm5yORQKYMjCqBFHV2Ka
 4BoLCKmX9HeISDcJvPB3B+/rSThzJnzBo10bv+7Uv9HM90WskBtR3xjQVpr+RV1L
 VTfELYOiTfaPMt57hDct5V7G6hsBMvIZqHqC9yq3Q+IesJE0euYdSpqRV9EznJv7
 EcmJL6S5Pkzds3PU2bnjqUQWb1BRwwVEpwkoWUzJ/5kYmgmo1vCQOW2Tr6s39JSy
 GcOEBBvruVCf1e9DuJYQYx25f04ceE52XuS3f6Q90W4UsDXFO+PphEf5dapE/ca8
 3+71tnZeb/VBHyZ7Oor43jkGVhsQs5+rIJpcN5UFV2MKX9hwnTvdA2AgxdqM5Bzt
 a5KVWPs5OUHNJKNw9Cu0F17Vzdlqh+2ac6gCIIv1TGltJ8GSRIfsIRJ56lRUVyUP
 ZGssnvbTLzq+ZdzaMTgDtJdz9CNOr9yQqQEZ2rFE9gASI8/Lw/EGNDVjK+vpNst8
 57IS1H0RO//I96WB0U8Ni0EdLlgsdGISTHkspj/JMNMcSisS94+tuK1rHHAw/j83
 2AxEhNOQewA/6ZRT329X
 =GCqU
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.13e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Fifth round of IIO new drivers, cleanups and functionality for the 3.13 cycle.

New Driver
* Freescale mag3110 magnetometer driver.

New functionality
* Add LPS001WP support to the ST pressure driver.
* Allow the max1363 driver to use only smbus functions for 8 bit devices. This
  allows the driver to be used when more extensive i2c support is not
  available.

Cleanups
* Fix incorrect description of unit conversions in ak8975.
* Switch to pr_err in industrialio-core.c instead of direct printk calls.
* Some simple redundant error handling removal patches.
* Trivial warning suppression by adding brackets to a sizeof call.
* Drop redundant of_match_ptr casts in drivers that are dependent on
  OF supporting being present.  The only purpose of the of_match_ptr
  wrapper was to make stubbing out of the relevant structures trivial.

Fixes
* Make MXS_LRADC depend on INPUT to avoid compile failures. This fixes an
  issue introduced in the previous pull in this cycle.
2013-10-27 14:02:54 -07:00
Chen Gang
97b0b6ca4c drivers: staging: rtl8188eu: use 'ccflags-y' instead of EXTRA_CFLAGS in Makefile
If command line use EXTRA_CFLAGS (e.g. "EXTRA_CFLAGS=-mmedium-calls"
for arc architecture, with allmodconfig), it can not pass compiling,
the related error:

  drivers/staging/rtl8188eu/core/rtw_ap.c:22:27: fatal error: osdep_service.h: No such file or directory

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 07:12:58 -07:00
Ashvini Varatharaj
b1ad55e64c Staging: winbond: removing unused variables thread_count and link_name[]
Removing the variable thread_count and link_name[WB_MAX_LINK_NAME_LEN] array
since they are not used elsewhere in the driver

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 07:05:59 -07:00
Ashvini Varatharaj
f68cae405b Staging: winbond: removing CamelCase in core.h
Fixing TODO item: fix severeCamelCaseInfestation

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 07:04:40 -07:00
Rashika Kheria
7aff38176e Staging: slicoss: Replace seq_printf with seq_puts
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 07:03:19 -07:00
Ebru Akagunduz
b28ca1c7c3 Staging: iio: fix printk(KERN_ERR .. in lis3l02dq_core.c
Fix checkpatch.pl issues with prefer netdev_err(netdev, .. then
dev_err(dev, .. then pr_err(.. to printk(KERN_ERR
in lis3l02dq_core.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:59:35 -07:00
Archana kumari
5c36d5ae2e staging: vt6655: fixed use of unnecessary braces in baseband.c
This patch fixes use of unnecessary braces in baseband.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:54:54 -07:00
Johannes Löthberg
0f783c9db6 Staging: vt6656: fix a brace coding style issue in power.c
This patch fixes a brace warning in power.c found by checkpatch.pl

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:53:18 -07:00
Ebru Akagunduz
0aa82696fb Staging: vt6655: Fix Sparse Warning for Static Declarations in wpa.c
This patch fixes the Sparse Warning "symbol was not declared.
Should it be static?" in wpa.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:52:31 -07:00
Ebru Akagunduz
07bcc80037 Staging: vt6655: Fix Sparse Warning for Static Declarations in tkip.c
This patch fixes the Sparse Warning "symbol was
not declared. Should it be static?" in tkip.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:52:31 -07:00
Nandini Hanumanthagowda
05aaf1ac5f staging: vt6656: removed braces from single line if-statement
removed braces from if-control flow structs whenever it
contained only one statement to comply with the coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:51:25 -07:00
Nandini Hanumanthagowda
3cef1a2e8c staging: vt6656: fixed indentation and unnecessary space errors
Fixed the indentation errors and removed unnecessary space
warnings to comply with coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:51:25 -07:00
Malcolm Priestley
2467635ee3 staging: vt6656: call usb_device_reset before netdev registration
The USB reset occurs after netdev registration if network manager
calls device_open too fast causing USB fails in main_usb.c: device_init_registers.

Move the usb reset to before register_netdev.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:50:10 -07:00
Rashika Kheria
16fcfa17d5 Staging: lustre: Fix no use of assignment in if condition
This patch fixes the following checkpatch.pl error in lustre/ldlm/interval_tree.c-
ERROR: do not use assignment in if condition

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:23 -07:00
Dulshani Gunawardhana
b6ea5ef80a staging:media: Use dev_dbg() instead of pr_debug()
Use dev_dbg() instead of pr_debug() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Dulshani Gunawardhana
a152e879e0 staging:media: Use dev_info() instead of pr_info()
Use dev_info instead of pr_info() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Dulshani Gunawardhana
44ee8e8011 staging: media: Use dev_err() instead of pr_err()
Use dev_err() instead of pr_err() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Archana kumari
5619d97722 staging: media: lirc: Replaced printk macro with dev_info(dev,....) in lirc_imon.c
This patch replaces printk macro with dev_info(dev,....)
in lirc_imon.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:42:00 -07:00
Ebru Akagunduz
7ff1b12bf6 Staging: ft1000: remove unnecessary static function declarations in ft1000_hw.c
This patch removes unnecessary static function
declarations in ft1000_hw.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:36:39 -07:00
Ebru Akagunduz
bfb3af4ebc Staging: ft1000: Fix Sparse Warning for Static Declarations in boot.h
This patch fixes the Sparse Warning: "symbol 'bootimage'
was not declared. Should it be static?" in boot.h

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:35:54 -07:00
Ebru Akagunduz
40c2f5512c Staging: ft1000: Fix Sparse Warning for Static Declarations in ft1000_hw.c
This patch fixes the Sparse Warning: "symbol 'ft1000_reset'
was not declared. Should it be static?" in ft1000_hw.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:35:54 -07:00
Wei Yongjun
a5b7151504 staging: sep: add missing misc_deregister() on error in sep_register_driver_with_fs()
Add the missing misc_deregister() before return from
sep_register_driver_with_fs() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:29:48 -07:00
Rashika Kheria
6756bb7cd9 Staging: lustre: Replace __FUNCTION__ with __func__
This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_request.c-
WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:45:36 -07:00
Rashika Kheria
730ebc81c8 Staging: lustre: Fix paranthesis not required around return
This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_extent.c-
ERROR: return is not a function, parentheses are not required

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:43:23 -07:00
Rashika Kheria
5bd7797f29 Staging: lustre: Fix space required after ','
This patch fixes the following checkpatch.pl warning in lustre/ldlm/interval_tree.c-
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:43:23 -07:00
Rashika Kheria
c8b93908a2 Staging: lustre: Fix no spaces at the start of the line
This patch fixes the following checkpatch.pl warning in lustre/ldlm/interval_tree.c-
WARNING: please, no spaces at the start of a line

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:41:22 -07:00
Rashika Kheria
490f4dbc31 Staging: lustre: Fix code indentation for conditional statements
This patch fixes the following checkpatch.pl warning in lustre/ldlm/interval_tree.c-
WARNING: suspect code indent for conditional statements

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:40:48 -07:00
Rashika Kheria
ad0a75b4b7 Staging: lustre: Fix initialisation of statics to NULL or 0
This patch fixes the following checkpatch.pl error in
lnet/lnet/config.c:
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:34:53 -07:00
Rashika Kheria
e46b3a0bd5 Staging; lustre: Fix quoted string split across lines
This patch fixes the following checkpatch.pl issues in
lnet/lnet/config.c:
WARNING: quoted string split across lines

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:34:53 -07:00
Rashika Kheria
24edbe4fbf Staging: lustre: Fix space prohibited between function and open paranthesis
This patch fixes the following checkpatch.pl warning in
lnet/lnet/config.c-
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:34:53 -07:00
Nandini Hanumanthagowda
13a7e2cf9b staging: lustre: replaced C99 comment style by C89 style
As per coding style guidelines C89 comment style /*...*/
is preferred over C99 comment style //, hence replaced
C99 comment style by C89 comment style to fix checkpatch
error

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:28:00 -07:00
Nandini Hanumanthagowda
90131cc975 staging: lustre: added space before the open parenthesis
added space before the open parenthesis to fix checkpatch error

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:28:00 -07:00
Rashika Kheria
b51546141b Staging: lustre: Fix indentation of labels
This patch fixes the following checkpatch.pl issues in lnet/lnet/acceptor.c:
WARNING: labels should not be indented

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:27:06 -07:00
Rashika Kheria
9f100b8b66 Staging: lustre: Fix initialisation of statics to 0 or NULL
This patch fixes the following checkpatch.pl issues in lnet/lnet/acceptor.c:
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:27:06 -07:00
Rashika Kheria
5129097bf1 Staging: lustre: Fix quoted strings split across lines
This patch fixes the following checkpatch.pl issues in lnet/lnet/acceptor.c:
WARNING: quoted string split across lines

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:27:06 -07:00
Rashika Kheria
735c2e264b Staging: lustre: Fix EXPORT_SYMBOL should immediately follow its function/variable
This patch fixes the following checkpatch.pl issues in lnet/lnet/acceptor.c:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:27:06 -07:00
Rashika Kheria
f93c061686 Staging: lustre: Fix space prohibited between function name and open paranthesis
This patch fixes the following checkpatch.pl issues in lnet/lnet/acceptor.c:
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:27:06 -07:00
Himangi Saraogi
218c394a9a drivers/staging/lustre/lustre/osc/osc_io.c : remove space prohibited warning
There was a warning on running checkpatch.pl on the file
drivers/staging/lustre/lustre/osc/osc_io.c which stated:
WARNING: space prohibited between function name and open parenthesis '('
108: FILE: staging/lustre/lustre/osc/osc_io.c:108:
+	LIST_HEAD     (list);

total: 0 errors, 1 warnings, 828 lines checked

To get rid of the warning the extra spaces were eliminated.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:23:53 -07:00
Valentina Manea
5e1b887fa2 staging: lustre: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:23:53 -07:00
Lisa Nguyen
ac0a287194 staging: lustre: lnet: Reformat pointer variable in lib-lnet.h
Reformat a pointer variable in lib-lnet.h to meet kernel
coding style and eliminate pointer format warning
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:55 -07:00
Lisa Nguyen
02816395c0 staging: lustre: lnet: Remove unnecessary () from return statements
Remove unnecessary parentheses from return statements in lib-lnet.h
to meet kernel coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:55 -07:00
Lisa Nguyen
62fbc9f75e staging: lustre: lnet: Remove unnecessary spaces in lib-lnet.h
Remove spaces between function names and open parentheses to
meet kernel coding style and eliminate extra space warnings
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:54 -07:00
Lisa Nguyen
6da6eabe10 staging: lustre: Remove typedef and update cfs_hash struct
Remove typedef keyword and rename the cfs_hash_t struct to
cfs_hash in libcfs_hash.h. These changes resolve the "Do
not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that
depend on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:19:30 -07:00
Lisa Nguyen
6ea510c189 staging: lustre: Remove typedef and update cfs_hash_bd struct
Remove typedef keyword and rename the cfs_hash_bd_t struct to
cfs_hash_bd in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that depend
on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:18:09 -07:00
Lisa Nguyen
a3ea59e0ee staging: lustre: Remove typedef and update cfs_debug_limit_state struct
Removed typedef keyword and rename the cfs_debug_limit_state_t
struct to cfs_debug_limit_state in libcfs_debug.h. These changes
resolve the "Do not add new typedefs" warning generated by
checkpatch.pl and meet kernel coding style.

Struct variables in other header and source files
that depend on libcfs_debug.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:16:54 -07:00
Peng Tao
996adff883 staging/lustre: fix tv_usec build warning on parisc
As reported by Fengguang:

config: make ARCH=parisc allyesconfig

All warnings:

   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_extents_stats_pp_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1069:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_extents_stats_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1133:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_offset_stats_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1299:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
--
   drivers/staging/lustre/lustre/obdclass/lprocfs_status.c: In function 'lprocfs_stats_seq_show':
>> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c:1070:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type '__kernel_suseconds_t' [-Wformat]
--
   drivers/staging/lustre/lustre/osc/lproc_osc.c: In function 'osc_rpc_stats_seq_show':
>> drivers/staging/lustre/lustre/osc/lproc_osc.c:575:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/osc/lproc_osc.c: In function 'osc_stats_seq_show':
>> drivers/staging/lustre/lustre/osc/lproc_osc.c:687:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:15:22 -07:00
Peng Tao
363090e74f staging/lustre/llite: fix mkdir endless loop
Running on 3.11-rc4 kernel, I got below endless loop. It turns to be that Lustre
always saves the first page of a dir inode mapping at index ~0UL.  And after
commit 5a720394 (mm: teach truncate_inode_pages_range() to handle non page
aligned ranges), truncate_inode_pages_range() _NO LONGER_ truncates the page
that is sitting at index ~0UL.

[16768.998006] mkdir           R  running task        0  2717   2716 0x00000080
[16768.998073]  000000000000000e 0000000000000000 0000000000000000 ffff88000be00460
[16768.998157]  ffff88000ea65908 ffffffff810fec3e ffff88000ea65968 ffff8800229e7750
[16768.998241]  ffff88000ea658b8 0000000000000000 0000000000000000 ffff88000ea65958
[16768.998326] Call Trace:
[16768.998401]  [<ffffffff810fc6ed>] ? rcu_read_unlock+0x1c/0x2d
[16768.998473]  [<ffffffff810fec3e>] ? find_get_pages+0xf5/0x11b
[16768.998530]  [<ffffffff811078f0>] ? pagevec_lookup+0x20/0x2a
[16768.998586]  [<ffffffff8110920e>] ? truncate_inode_pages_range.part.2+0x161/0x39a
[16768.998680]  [<ffffffffa02ad5dc>] ? ll_md_blocking_ast+0x338/0x62f [lustre]
[16768.998744]  [<ffffffff8110947f>] ? truncate_inode_pages_range+0x38/0x3f
[16768.998805]  [<ffffffff811094f8>] ? truncate_inode_pages+0x12/0x14
[16768.998871]  [<ffffffffa02ad6e8>] ? ll_md_blocking_ast+0x444/0x62f [lustre]
[16768.998948]  [<ffffffff810981b5>] ? arch_local_irq_save+0x9/0xc
[16768.999022]  [<ffffffffa07ee0e8>] ? ldlm_cancel_callback+0x67/0x12a [ptlrpc]
[16768.999100]  [<ffffffffa07f85b2>] ? ldlm_cli_cancel_local+0xf3/0x2bc [ptlrpc]
[16768.999176]  [<ffffffffa07f9163>] ? ldlm_cli_cancel_list_local+0x7e/0x1e4 [ptlrpc]
[16768.999268]  [<ffffffffa07f9473>] ? ldlm_cancel_resource_local+0x1aa/0x1b9 [ptlrpc]
[16768.999385]  [<ffffffffa0657bad>] ? mdc_resource_get_unused+0xf8/0x115 [mdc]
[16768.999472]  [<ffffffff8109c887>] ? trace_hardirqs_on+0xd/0xf
[16768.999533]  [<ffffffffa06583d8>] ? mdc_create+0x11e/0x4db [mdc]
[16768.999597]  [<ffffffff8152ed84>] ? mutex_unlock+0xe/0x10
[16768.999654]  [<ffffffffa0350e99>] ? lmv_create+0x355/0x3e9 [lmv]
[16768.999712]  [<ffffffff811553b7>] ? final_putname+0x35/0x39
[16768.999775]  [<ffffffffa02ae167>] ? ll_new_node+0x33b/0x3ff [lustre]
[16768.999841]  [<ffffffffa02ae62c>] ? ll_mkdir+0xf2/0x127 [lustre]
[16768.999897]  [<ffffffff81156996>] ? vfs_mkdir+0x84/0xc9
[16768.999961]  [<ffffffff81158cf8>] ? SyS_mkdirat+0x77/0xad
[16769.000014]  [<ffffffff81158d47>] ? SyS_mkdir+0x19/0x1b
[16769.000066]  [<ffffffff81538652>] ? system_call_fastpath+0x16/0x1b

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:15:22 -07:00
Peng Tao
86bac591de lustre/fld: remove fld_thread_key
It is left over when porting Lustre tree patch in commit (e62e5d92) and should be
removed.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:15:22 -07:00
Lisa Nguyen
1e27138bae staging: lustre: Remove typedef and update cfs_hash_bucket struct
Remove typedef keyword and rename the cfs_hash_bucket_t struct to
cfs_hash_bucket in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl and
meet kernel coding style.

The struct variables in hash.c are updated to reflect this change
as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:12:19 -07:00
Mark Brown
82f85cf98f Merge remote-tracking branch 'spi/topic/wr' into spi-next 2013-10-25 09:51:41 +01:00
Rashika Kheria
7c64884b19 Staging: sb105x: Fix a possible null dereference
This patch fixes the following error in sb_pc_mp.c-

drivers/staging/sb105x/sb_pci_mp.c:546 mp_startup() error: we previously assumed 'info->tty' could be null (see line 525)

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-25 06:34:21 +01:00
John Stultz
5957324045 staging: ashmem: Fix ASHMEM_PURGE_ALL_CACHES return value
Hopefully this isn't too late for 3.12.

In commit 7dc19d5aff (convert shrinkers to new count/scan API)
the return value to PURGE_ALL_CACHES was dropped, causing -EPERM
to always be returned.

This patch re-adds the ret assignment, setting it to the the
ashmem_shrink_count(), which is the lru_count.

(Sorry this was missed in the review!)

Fixes: 7dc19d5aff ("convert shrinkers to new count/scan API")
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Cc: Glauber Costa <glommer@openvz.org>
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: stable <stable@kernel.org> # 3.12
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-25 06:22:39 +01:00
Al Viro
72c2d53192 file->f_op is never NULL...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24 23:34:54 -04:00
Al Viro
22bd002ee7 rtl8188eu: remove dead code
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24 23:34:54 -04:00
Randy Dunlap
2ab61fa047 staging/iio/adc: MXS_LRADC depends on INPUT
mxs-lradc.c uses many input_() functions so it should
depend on INPUT to fix build errors.

drivers/built-in.o: In function `mxs_lradc_ts_unregister':
drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device'
drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device'
drivers/built-in.o: In function `input_report_abs':
include/linux/input.h:399: undefined reference to `input_event'
include/linux/input.h:399: undefined reference to `input_event'
include/linux/input.h:399: undefined reference to `input_event'
drivers/built-in.o: In function `input_report_key':
include/linux/input.h:389: undefined reference to `input_event'
drivers/built-in.o: In function `input_sync':
include/linux/input.h:414: undefined reference to `input_event'
drivers/built-in.o:include/linux/input.h:389: more undefined references to `input_event' follow

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-23 16:53:29 +01:00
Linus Torvalds
f4e5e14f53 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 - Compilation fixes for GCC < 4.4.6
 - one Kbuild dependency select fix (selecting videobuf on msi3101)
 - driver fixes on tda10071, e4000, msi3101, soc_camera, s5p-jpeg,
   saa7134 and adv7511
 - some device quirks needed to make them work properly
 - some videobuf2 core regression fixes for some features used only on
   embedded drivers

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] saa7134: Fix crash when device is closed before streamoff
  [media] adv7511: fix error return code in adv7511_probe()
  [media] ths8200: fix compilation with GCC < 4.4.6
  [media] ad9389b: fix compilation with GCC < 4.4.6
  [media] adv7511: fix compilation with GCC < 4.4.6
  [media] adv7842: fix compilation with GCC < 4.4.6
  [media] s5p-jpeg: Initialize vfd_decoder->vfl_dir field
  [media] videobuf2-dc: Fix support for mappings without struct page in userptr mode
  [media] vb2: Allow queuing OUTPUT buffers with zeroed 'bytesused'
  [media] mx3-camera: locking cleanup in mx3_videobuf_queue()
  [media] sh_vou: almost forever loop in sh_vou_try_fmt_vid_out()
  [media] tda10071: change firmware download condition
  [media] msi3101: correct max videobuf2 alloc
  [media] Add HCL T12Rg-H to STK webcam upside-down table
  [media] msi3101: Kconfig select VIDEOBUF2_VMALLOC
  [media] msi3101: msi3101_ioctl_ops can be static
  [media] e4000: fix PLL calc bug on 32-bit arch
  [media] uvcvideo: quirk PROBE_DEF for Microsoft Lifecam NX-3000
  [media] uvcvideo: quirk PROBE_DEF for Dell SP2008WFP monitor
2013-10-23 07:52:36 +01:00
Lisa Nguyen
29323b3e6b staging: lustre: Remove typedef and update cfs_hash_lock union
Remove typedef keyword and rename the cfs_hash_lock_t
union to cfs_hash_lock in libcfs_hash.h. These changes
resolve the "Do not add new typedefs" warning
generated by checkpatch.pl and meet kernel coding style.

The union variables in hash.c are updated to reflect this
change as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 05:48:15 +01:00
Dulshani Gunawardhana
bcc3b70425 staging:lustre: replace foo* with foo *
Fix checkpatch.pl warning of "(foo*)" should be "(foo *)" in lustre/lov

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:50:01 +01:00
Dulshani Gunawardhana
126e7dab51 staging:lustre: Fix externs should be avoided in .c files warning
Fix the checkpatch.pl warning 'externs should be avoided in .c files' in
lustre/lov.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:50:01 +01:00
Dulshani Gunawardhana
5f3a68f96d staging:lustre: Fix space before open parenthesis
Fix checkpatch.pl error "space required before the open parenthesis '('"
in lustre/lov.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:50:01 +01:00
Dulshani Gunawardhana
2c0514ee8a staging:lustre: Replace max() with max_t()
Replace max() with max_t() in accordance to chekpatch.pl warning in
lov_obd.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:50:01 +01:00
Dulshani Gunawardhana
5e4488316e staging:lustre: Fix C99 style comments
Fix C99 style comments in lov_obd.c in accordance to checkpatch.pl
warning.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:50:00 +01:00
Dulshani Gunawardhana
66e7a94a1b staging:lustre: Remove space between function name and open parenthesis
Remove checkpatch.pl warning of space prohibited between function name
and open parenthesis '('in /lustre/lov.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:46:10 +01:00
Lisa Nguyen
d338bce130 staging: lustre: libcfs: Remove bitmap.h file
The functions in the bitmap.h header file are not being used by
any source file in the lustre driver.

Unless there are any objections, please remove the bitmap.h
header file as it contains unused code in the kernel.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:24:37 +01:00
Teodora Baluta
207287595b staging: rtl8187se: checkpatch cleanups
Fix the following checkpatch.pl errors:

drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:890: "foo* bar" should be "foo *bar"
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:944: "foo* bar" should be "foo *bar"

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:55:44 -07:00
Teodora Baluta
17ab33eed0 staging: rtl8187se: fix static sparse warnings
This patch fixes sparse warnings regarding functions that should be
static in driver rtl8187se.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:55:16 -07:00
Teodora Baluta
8e87b1b3d2 staging: rtl8187se: add missing __iomem annotation
Fix the following type of sparse warnings:

drivers/staging/rtl8187se/r8180_core.c:163:48: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8187se/r8180_core.c:163:48:    expected void const volatile [noderef] <asn:2>*addr
drivers/staging/rtl8187se/r8180_core.c:163:48:    got unsigned char [usertype] *

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:54:49 -07:00
Teodora Baluta
8b65c5bb09 staging: rtl8187se: use gfp_t instead of int
Fix the following type of sparse warnings:

drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c:249:17: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c:249:17:    expected restricted gfp_t [usertype] flags
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c:249:17:    got int [signed] gfp_mask

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:54:49 -07:00
Rashika Kheria
131ccc2e74 Staging: sb105x: Remove redundant null check
This patch fixes the following Sparse information in sb_pci_mp.c-

~/git/kernels/linux/drivers/staging/sb105x/sb_pci_mp.c:1813
mp_unregister_driver() info: redundant null check on drv->state calling kfree()

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:53:45 -07:00
Ashvini Varatharaj
056e0af2f5 Staging: line6: replacing -EINVAL with retval in driver.c
drivers/staging/line6/driver.c:208 line6_send_raw_message_async_part()
info: why not propagate 'retval' from usb_submit_urb() instead of (-22)?

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:06 -07:00
Ashvini Varatharaj
88ef9b1bce Staging: line6: replacing -EINVAL with retval
drivers/staging/line6/midi.c:147 send_midi_async() info: why not
propagate 'retval' from usb_submit_urb() instead of (-22)?

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:06 -07:00
Ashvini Varatharaj
a8eecad5c9 Staging: speakup: replacing simple_strtoul with kstrtoul
Fix checkpatch warning: WARNING: simple_strtoul is obsolete, use
kstrtoul instead

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:06 -07:00
Rashika Kheria
1b7e763140 Staging: sep: Fix Smatch Warning in sep_crypto.c
This patch fixes the following smatch warning-

~/git/kernels/linux/drivers/staging/sep/sep_crypto.c:1137
sep_crypto_block_data() info: why not propagate 'int_error' from sep_oddball_pages() instead of (-12)?
~/git/kernels/linux/drivers/staging/sep/sep_crypto.c:1152
sep_crypto_block_data() info: why not propagate 'int_error' from sep_oddball_pages() instead of (-12)?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:05 -07:00
Archana kumari
c8e46f447d staging: vt6655: Fix C99 commenting style in michael.h
This patch fixes C99 commenting style in staging:vt6655:michael.h

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:05 -07:00
Rashika Kheria
79b0ae8de2 Staging: slicoss: Fix quoted string split across lines
This patch fixes the following checkpatch.pl warning in slicoss.c-
WARNING: quoted string split across lines

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:45:08 -07:00
Rashika Kheria
f66626e436 Staging: slicoss: Refactor code by introducing new function slic_interrupt_card_up()
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: Too many leading tabs - consider code refactoring

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:45:08 -07:00
Rashika Kheria
1f6876cf9f Staging: slicoss: Replace printk() with pr_debug() or dev_dbg() as required
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:45:08 -07:00
Rashika Kheria
0217a889ed Staging: slicoss: Removal of if check since debugfs_remove(NULL) is safe
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: debugfs_remove(NULL) is safe this check is probably not
required

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:45:08 -07:00
Ashvini Varatharaj
f32eca7d6f Staging: dgnc: avoiding buffer overflow
drivers/staging/dgnc/dgnc_neo.c:1969 neo_vpd() error: buffer overflow 'brd->vpd' 128 <= 128
drivers/staging/dgnc/dgnc_neo.c:1970 neo_vpd() warn: buffer overflow 'brd->vpd' 128 <= 130
drivers/staging/dgnc/dgnc_neo.c:1970 neo_vpd() warn: buffer overflow 'brd->vpd' 128 <= 130

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:35:05 -07:00
Ashvini Varatharaj
e15b0c4eeb Staging: dgnc: removing the comparison 'board<0'
Fix dgnc_mgmt_ioctl() warn: unsigned 'board' is never less than zero.

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:35:05 -07:00
Archana kumari
a27582310c staging: dgnc: braces {} are not necessary for single statement in dgnc_driver.c
Fixes "braces {} are not necessary for single statement blocks" warning
in dgnc_driver.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:35:05 -07:00
Archana kumari
4ee0925da1 staging: dgnc:Removed unecessary error messages in dgnc_driver.c
Fixed removal of unecessary error messages in staging:dgnc:dgnc_driver.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:35:05 -07:00
Archana kumari
35128d2910 staging: wlags49_h2: Fixes the sparse warning in sta_h2.c
This patch fixes sparse warning "Using plain integer as NULL pointer" in
sta_h2.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:28:58 -07:00
Archana kumari
5a98068694 staging: wlags49_h2: fixed space prohibited warnings in hcf.h
This patch fixes the following warnings in hcf.c:
"space prohibited between function name and open parenthesis '(' "

"space prohibited before that close parenthesis ')' ".

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:26:58 -07:00
Ian Abbott
03c1a0b890 staging: comedi: s626: bitfield manipulation macros for CRA, CRB and setup
Some bits of the 'CRB' register have different functions when read or
written, so add macros to define the read-only parts.

Add macros to define the widths of the bitfields in the 'CRA' and 'CRB'
registers and the standard encoder setup value.

Add macros to construct and extract parts of the 'CRA' and 'CRB'
register values and the standard encoder setup value, along with a
couple of general helper macros for the above.

Redefine the bitfield mask macros for 'CRA', 'CRB' and standard encoder
setup using the above.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott
e0b07b797c staging: comedi: s626: add missing bits for 'CRB' register
There are some bits in the 'CRB' register not defined in "s626.h".
Three of these are read-only bits that overlay the write-only interrupt
control bits.  Another missing bit controls whether counter 'B' is
cleared when counter 'A' overflows.  Add the missing bit definitions for
completeness.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott
9349399333 staging: comedi: s626: correct S626_CRAMSK_CLKPOL_A macro (unused)
The counter 'A' clock polarity field in the 'CRA' register is only 1 bit
wide, but the `S626_CRAMSK_CLKPOL_A` macro shows it as 2 bits wide,
which would overlap with the counter 'A' interrupt source field.  This
is harmless as the macro isn't actually used yet, but correct it anyway
as I want to use 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>
2013-10-19 13:47:23 -07:00
Ian Abbott
622ec01ab9 staging: comedi: s626: distinguish counter src from encoder mode
The macros `S626_CLKSRC_COUNTER`, `S626_CLKSRC_TIMER` and
`S626_CLKSRC_EXTENDER` are used logically to set the operating mode of
an encoder channel.  `S626_CLKSRC_COUNTER` (0) is also used as a 2-bit
physical value to set the counter source of an encoder channel to
"encoder".

Rename the macros to `S626_ENCMODE_COUNTER`, `S626_ENCMODE_TIMER` and
`S626_ENCMODE_EXTENDER` and rename some other macros and (unused)
functions relating to the encoder mode for consistency.

Define new macros to specify the physical counter source values for the
'CRA' register and rename the corresponding bitshift and mask macros
accordingly.  The physical values for the counter source are:

  S626_CNTSRC_ENCODER = 0      // encoder
  S626_CNTSRC_DIGIN = 1        // digital inputs
  S626_CNTSRC_SYSCLK = 2       // system clock up
  S626_CNTSRC_SYSCLK_DOWN = 3  // system clock down

Also use the `S626_CNTSRC_SYSCLK` value as a bitmask (bit 1) to indicate
either of the system clock values, with the direction (bit 0) indicated
separately in this case.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott
7293808874 staging: comedi: s626: correct a comment in s626_get_mode_b()
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>
2013-10-19 13:47:23 -07:00
Ian Abbott
2e179e428c staging: comedi: s626: specify bitshift for encoder A clock source
When setting the clock source for one of the 'A' encoders to operate in
"counter" mode in `s626_set_mode_a()`, bitshift the clock source value by
`S626_CRABIT_CLKSRC_A` for consistency with the other modes.  This has
no effect on the value since `S626_CRABIT_CLKSRC_A` is 0.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott
6c661434f9 staging: comedi: s626: clock polarity and direction are the same
When setting up an encoder channel, the setup value includes a polarity
and direction, but these are the same bit of the setup value:

  S626_CLKPOL_POS = S626_CNTDIR_UP = 0

  S626_CLKPOL_NEG = S626_CNTDIR_DOWN = 1

In the construction of the setup value, both the CLKPOL and the CNTDIR
constants are shifted by the same amount `S626_BF_CLKPOL`.  Only the
following combinations are set up currently (this may change if user
configuration of the encoder is implemented properly):

  (S626_CLKPOL_POS << S626_BF_CLKPOL)

  (S626_CLKPOL_POS << S626_BF_CLKPOL) |
  (S626_CNTDIR_UP << S626_BF_CLKPOL)

  (S626_CLKPOL_POS << S626_BF_CLKPOL) |
  (S626_CNTDIR_DOWN << S626_BF_CLKPOL)

The first two are used in "counter" mode and is equivalent to:

  (S626_CLKPOL_POS << S626_BF_CLKPOL)

The last one is used in "timer" mode and is equivalent to:

  (S626_CNTDIR_DOWN << S626_BF_CLKPOL)

Use the shorter equivalents.  The comments in "s626.h" indicate that the
'CLKPOL' constants make more sense for the "counter" mode (when the
encoders operate as up/down counters) and the 'CNTDIR' constants make
more sense for the "timer" mode.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott
f8d939e411 staging: comedi: rtd520: use normal bitfield functions
The `unsigned char chan_is_bipolar[]` member of `struct rtd_private` is
used with some macros as a packed array of 1-bit values that indicate
whether the corresponding entries in the hardware's "channel-gain" table
have been set to a bipolar (1) or unipolar (0) range, as the raw samples
from the hardware need to be cooked differently in each case.

Replace the declaration of the member with a standard Linux bitfield
using `DECLARE_BITFIELD()`, and replace the home-grown macros used
access the bitfield with the standard Linux non-atomic bitop functions,
`__set_bit()`, `__clear_bit()` and `test_bit()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:45:54 -07:00
Aldo Iljazi
0735e83c78 Staging: ft1000: fixed two coding style issues
Fixed two coding style issues, specifically:

ft1000_proc.c:35: ERROR: space required before the open parenthesis '('
ft1000_proc.c:42: ERROR: space required before the open parenthesis '('

Signed-off-by: Aldo Iljazi <me@aldo.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:43:41 -07:00
Eli Billauer
35fcf7e3c0 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_core
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer
1a2f9a9ea5 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_of
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer
2cb85c0845 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_pcie
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer
26a6fc93fc staging: xillybus: Remember device pointer for use with dev_* functions
This is necessary so that xillybus_core uses the correct device pointer
for PCIe devices in diagnostic message calls (dev_err, dev_warn and dev_info)

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Lisa Nguyen
5f45aa1668 staging/lustre/lnet: Remove unnecessary spaces in router_proc.c
Remove unnecessary spaces between function names and open
parentheses in router_proc.c to meet kernel coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:38:14 -07:00
Lisa Nguyen
28ad960e7a staging/lustre/lnet: Fix static initialization error in router_proc.c
Fixed the static initialization error generated by checkpatch.pl to
meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:38:14 -07:00
Lisa Nguyen
51f01fabe9 staging/lustre/lnet: Reformat pointer variable in lib-move.c
Reformat a pointer variable in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen
2b5f2e44a0 staging/lustre/lnet: Remove () from return statements in lib-move.c
Remove unnecessary parentheses from return statements to
eliminate errors generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen
ae4003f056 staging/lustre/lnet: Adjust lines to meet 80 column limit in lib-move.c
Fixed lines to not exceed more than 80 columns per line to meet
kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen
9b79ca855e staging/lustre/lnet: Move open braces to previous lines in lib-move.c
Move open braces to previous lines in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen
af66a6e29c staging/lustre/lnet: Remove unnecessary whitespace in lib-move.c
Remove unnecessary whitespace around open parentheses in lib-move.c
to meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Lisa Nguyen
5f849bb0e4 staging/lustre/lnet/selftest: Remove unnecessary spaces in brw_test.c
Remove spaces between function names and open parentheses to
eliminate warnings generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Lisa Nguyen
5252bbfde5 staging/lustre/lnet/selftest: Fix trailing statements in brw_test.c
Fix trailing statement errors generated by checkpatch.pl in
brw_test.c to meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Teodora Baluta
5e1e704a7d staging: rtl8192u: fix sparse warning, make a function static
Fix the following sparse warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:240:22: warning: symbol 'ieee80211_alloc_txb' was not declared. Should it be static?

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:49 -07:00
Ashvini Varatharaj
c45a9a9bf3 Staging: speakup: removing jiffies comparison in speakup_apollo.c
Fix checkpatch warning: WARNING: Comparing jiffies is almost always
wrong; prefer time_after, time_before and friends

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:19 -07:00
Ashvini Varatharaj
75b76b470f Staging: speakup: removing jiffies comparison using time_after_eq()
Fix checkpatch warning:  Comparing jiffies is almost always wrong;
prefer time_after, time_before and friends

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:15 -07:00
Greg Kroah-Hartman
2ef9d838e4 Fourth round of IIO new drivers, functionality and cleanups for the 3.13 cycle.
New Drivers
 * cm36651 combined RGB light and proximity sensor.
 
 Core improvements
 
 * Some more fixes and cleanups related to buffers.  These include the second
   half of a series which went is as fixes.  The basis for delaying until the
   next merge window is that some are too invasive for this late in a cycle
   and others only effect code paths current unused in the mainline tree.
   In this case we have:
    * protecting against concurrent userspace access
    * fixing a memory leak if a device goes away
    * avoiding always reallocating the buffer whether or not it has changed
      (a bug fix, but one with no functional changes other than a small speed
      improvement.)
    * Add reference counting for buffers to ensure they hang around if open
      from userspace or in kernel when the device is forcefully removed.
    * Return -ENODEV for buffer access operations when the device has gone
      away.
    * Add proper locking for iio_update_buffers (currently we only have one
      buffer per device in mainline, but an input bridge driver is under
      development which would make this bug 'real'.)
    * Wake up anyone waiting on a buffer if the device is unregistered.  A
      subsequent read will fail, notifying userspace that the device is no
      longer there rather than having it wait possibly for ever.
 
 * Move the iio_sw_preenable functionality into the core.  This avoids drivers
   having to 'know' about how the buffers are implemented and is called by
   almost all drivers anyway.  Those that don't call it are not harmed by it
   being called.
 * New registration approach for information (i.e. sysfs attributes) about
   events.  Much more generic and now similar to how the equivalent is
   handled for channel information.  The events infrastructure had been left
   behind by other changes so this brings it back in line.
 * Using the new events registration approach, add a hysterisis event_info
   element and apply this to those drivers with this property.
 * A little unitialized variable bug in the generic_buffer.c example.
 * Factor out the code for freeing lists of IIO Device attributes to avoid
   some repitition.
 
 Driver cleanups
 * At91 driver gains touch screen support and some related fixes.
 * Follow up series of patches removing the now redundant
   iio_sw_buffer_preenable calls.
 * Lots of conversions to the new event registration methods.
 * Another round of hmc5843 cleanups as that driver moves towards graduating
   from staging.
 * Make some SoC drivers buildable if COMPILE_TEST is used.  Follow up fixes
   for a few bits and bobs that revealed.
 * Add explicit includes of linux/of.h to those drivers making us of linux/of.h
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYmsbAAoJEFSFNJnE9BaIuvsQAIxknxxAVBl8Jj8sqFJM/TJh
 /iBP4c7HPsiZUFAyt59PONvwaY2iacTjWYx55mPsHpLXtVG4nsTj/E21lSPsp90D
 YuXLmT8vU4kN3X1wJkiUmBYzO6mqHlBw8Z+dcLB4N4xOpHgvFTSuc12Gdmilbna2
 APjAm513G6MiSEyG/RpNsKXGHFZBOCnvjs4hTQKg9QEzLvoqBZ/e3vUAsswMFLvP
 eTTMRvgfNz2TSeOR1F5tNrMTnilAuBUZ8sCUw4HwtNN2KAnUNKtuGD174U00z7pH
 qKCfZffm34Vb7niEZsVn2MhvbXwdUgWmEF1yqwApXTfnXsDTqWLakhMUHExIMozo
 8jIewD30v6Daj+biPGxnmikRl9XfzgCN5nO11lx68rwur4q2KMYvSRdMVecipa6U
 grSgXebFoQgdnj+2CN/0Z0pMqHeXpgMYzpG04o30/SjXgF4KRD6nDLZamJwwVHDj
 Iivn5EyJeOt83BKSAtHm6tRqIbZ1abVwHoztxPDgl0nnuEtRv4VMGECOtLlGkHkx
 lV2DdLd4UyahF3gPp6xvbnmhk6yWH4xMN0zwImSI4Lt7+ncRoZ6dy2i3HxrHNyu6
 8zMKdZQDnMMoxcdqSxy5nXezf/x6e2MVReQiWLbSzpD1WU6OD0BrfGMe+3sFXSde
 lsFgkAigdJ58t2vZ+gwb
 =TXhl
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.12d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Fourth round of IIO new drivers, functionality and cleanups for the 3.13 cycle.

New Drivers
* cm36651 combined RGB light and proximity sensor.

Core improvements

* Some more fixes and cleanups related to buffers.  These include the second
  half of a series which went is as fixes.  The basis for delaying until the
  next merge window is that some are too invasive for this late in a cycle
  and others only effect code paths current unused in the mainline tree.
  In this case we have:
   * protecting against concurrent userspace access
   * fixing a memory leak if a device goes away
   * avoiding always reallocating the buffer whether or not it has changed
     (a bug fix, but one with no functional changes other than a small speed
     improvement.)
   * Add reference counting for buffers to ensure they hang around if open
     from userspace or in kernel when the device is forcefully removed.
   * Return -ENODEV for buffer access operations when the device has gone
     away.
   * Add proper locking for iio_update_buffers (currently we only have one
     buffer per device in mainline, but an input bridge driver is under
     development which would make this bug 'real'.)
   * Wake up anyone waiting on a buffer if the device is unregistered.  A
     subsequent read will fail, notifying userspace that the device is no
     longer there rather than having it wait possibly for ever.

* Move the iio_sw_preenable functionality into the core.  This avoids drivers
  having to 'know' about how the buffers are implemented and is called by
  almost all drivers anyway.  Those that don't call it are not harmed by it
  being called.
* New registration approach for information (i.e. sysfs attributes) about
  events.  Much more generic and now similar to how the equivalent is
  handled for channel information.  The events infrastructure had been left
  behind by other changes so this brings it back in line.
* Using the new events registration approach, add a hysterisis event_info
  element and apply this to those drivers with this property.
* A little unitialized variable bug in the generic_buffer.c example.
* Factor out the code for freeing lists of IIO Device attributes to avoid
  some repitition.

Driver cleanups
* At91 driver gains touch screen support and some related fixes.
* Follow up series of patches removing the now redundant
  iio_sw_buffer_preenable calls.
* Lots of conversions to the new event registration methods.
* Another round of hmc5843 cleanups as that driver moves towards graduating
  from staging.
* Make some SoC drivers buildable if COMPILE_TEST is used.  Follow up fixes
  for a few bits and bobs that revealed.
* Add explicit includes of linux/of.h to those drivers making us of linux/of.h
2013-10-19 05:16:34 -07:00
Peter Meerwald
094509b1d1 staging:iio:hmc5843: Trivial cleanup
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:51 +01:00
Peter Meerwald
9d5ad0c3e7 staging:iio:hmc5843: Check initialization and chip identifier
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:16 +01:00
Peter Meerwald
f3f755197b staging:iio:hmc5843: Introduce _set_range_gain()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:48 +01:00
Peter Meerwald
ca4c6172cd staging:iio:hmc5843: Rename _set_rate() to _set_samp_freq()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:27 +01:00
Peter Meerwald
4f1ca4158d staging:iio:hmc5843: Reorganize _set_meas_conf()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:07 +01:00
Peter Meerwald
62248758a7 staging:iio:hmc5843: Rename _configure() to _set_mode()
and be consistent with other setter functions in that first argument
is hmc5843_data

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:41 +01:00
Peter Meerwald
7183de9450 staging:iio:hmc5843: Remove ability to change operating mode
only continuous mode is supported for now; the driver could/should
be switched to single conversion mode

operating mode should be determined by the way IIO accesses the device
and not exposed explicitly

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:10 +01:00
Peter Meerwald
cb9b9a828f staging:iio:hmc5843: Add trigger handling
v3:
* use __be16 instead of s16
v2 (thanks to Jonathan Cameron):
* drop dynamic buffer allocation, buffer is in hmc5842_data
* grab timestamp near data acquisition
* restrict available scan masks (only read all axis)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:47:55 +01:00
Peter Meerwald
39c1882882 staging:iio:hmc5843: Always read all channels values otherwise no updates
v2:
* use __be16 instead of s16

Split out data ready/wait for read measurement
fix bug in case reading status register fails

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:46:43 +01:00
Peter Meerwald
9a3b2d5e0c staging:iio:hmc5843: Rename _check_samp_freq to get_samp_freq_index
and drop/inline helper functions _check_int_plus_micros() and
_show_int_plus_micros()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:41 +01:00
Peter Meerwald
ae6f54d2b1 staging:iio:hmc5843: Use SCALE instead of magn_range
v3:
* rename _check_scale() to _get_scale_index()
v2:
* use SCALE instead of CALIBSCALE to control the range/gain
  of measurements

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:09 +01:00
Lars-Peter Clausen
a47f6e08ed staging:iio:spear_adc: Fix IRQ check
The test in the spear_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is
an invalid IRQ. It also rejects IRQ numbers that are larger or equal than
NR_IRQS. First of all drivers should never need to reference NR_IRQS and
secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check
might reject valid IRQ numbers. This patch modifies the check to only test
against less or equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:14:00 +01:00
Lars-Peter Clausen
2918ad14cc staging:iio:lpc32xx_adc: Fix IRQ check
The test in the lpc32xx_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is an
invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS.
First of all drivers should never need to reference NR_IRQS and secondly with
CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject
valid IRQ numbers. This patch modifies the check to only test against less or
equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:11:45 +01:00
Nandini Hanumanthagowda
1c3e56f99c staging: vt6656: removed line over 80 chars warning
Removed the checkpatch warning of line over 80 chars
by breaking the long line into sensible chunks of 2 lines
to comply with coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda
efbe51829f staging: vt6656: removed C99-style comments
Linux style for comment is C89 style "/* */" and it
doesn't prefer C99-style comment "//...". Hence replaced
C99-style comments used in code by C89 style comment to
comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda
5a69f36db3 staging: vt6656: removed unnecessary parentheses in return statement
There was parentheses around return statement's value which
was not required since return statement is not a function.
Hence removed the parentheses to eliminate the checkpatch error
which states:
	ERROR: return is not a function, parentheses are not required

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda
fc044ac39c staging: vt6656: removal of braces under if-control statement
Removed braces under if-else control flow statement whenever
there is only one statement under if-else control statement
to comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda
1266ed7633 staging: vt6656: indentation and removal of unnecessary spaces
Removed unnecessary white spaces at beginning of line
and added proper indentation to fix checkpatch warnings/errors
to improve the readability of code

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:16 -07:00
Archana kumari
f1f9f35019 staging: vt6655:removed incorrect casting in hostap.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:32:35 -07:00
Ashvini Varatharaj
8cedb1be2f Staging: sb105x: Removing trailing whitespaces
Fix checkpatch error : ERROR: trailing whitespace

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Ashvini Varatharaj
40e4205ad6 Staging: wlan-ng: changing "* dev" to "*dev"
Fix checkpatch error: ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Archana kumari
3d47910be4 staging: dgnc: braces {} are not necessary for single statement in dgnc_cls.c
Fix checkpatch.pl issues with braces {} are not necessary
for single statement blocks in dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:11:08 -07:00
Archana kumari
8009ae1a08 staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the Sparse Warning "symbol was not declared. Should it be
static?" in aes_ccmp.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:09:36 -07:00
Rashika Kheria
d79a441151 Staging: lustre: Removal of Space between function name and parenthesis in timer.c
The patch fixes the following checkpatch.pl warning in timer.c-
WARNING: space prohibited between function name and open parenthesis '(

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria
b0834c8728 Staging: lustre: Removal of assignment in if condition in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: do not use assignment in if condition

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria
eac2e8c6f5 Staging: lustre: Fix quoted string split across lines in conrpc.c
This patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: quoted string split across lines conrpc.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria
fc831a9049 Staging: lustre: Fix Space Prohibition before '++' in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: space prohibited before that '++'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria
98d1bbddc6 Staging: lustre: Fix Space Requirement around ':' in conrpc.c
The patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: spaces required around that ':'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria
4d72b5afc0 Staging: lustre: Removal of Space between function name and parenthesis in conrpc.c
The patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Krzysztof Hałasa
cfd736adf6 [media] SOLO6x10: Fix video frame type (I/P/B)
Mask v4l2_buf.flags to indicate only I/P/B frames.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:50:00 -03:00
Teodora Baluta
f149080984 Staging: rtl8192u: use gfp_t instead of int
This patch fixes the following type of sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:53:42 -07:00
Teodora Baluta
a115ee4175 Staging: rtl8192u: fix functions that should not be declared extern
These functions are already marked extern in the header file

drivers/staging/rtl8192u/r819xU_phy.c:1716:13: warning: function 'InitialGainOperateWorkItemCallBack' with external linkage has definition
drivers/staging/rtl8192u/r819xU_cmdpkt.c:497:12: warning: function 'cmpk_message_handle_rx' with external linkage has definition

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:51:26 -07:00
Rashika Kheria
1d612bd477 Staging: vt6655: Removal of Unused Function
This patch removes unused function 'RFbShutDown' from file rf.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:49:19 -07:00
Rashika Kheria
5da5804b9c Staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the following Sparse Warnings in rf.c:

drivers/staging/vt6655/rf.c:58:21: warning: symbol 'dwAL2230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:76:21: warning: symbol 'dwAL2230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:93:21: warning: symbol 'dwAL2230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:110:15: warning: symbol 'dwAL2230PowerTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:180:21: warning: symbol 'dwAL7230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:203:21: warning: symbol 'dwAL7230InitTableAMode' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:222:21: warning: symbol 'dwAL7230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:288:21: warning: symbol 'dwAL7230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:352:21: warning: symbol 'dwAL7230ChannelTable2' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:431:6: warning: symbol 's_bAL7230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:474:6: warning: symbol 's_bAL7230SelectChannel' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:634:6: warning: symbol 'RFbAL2230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:681:6: warning: symbol 'RFbAL2230SelectChannel' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:47:29 -07:00
Ian Abbott
f1d376beae staging: comedi: usbduxsigma: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott
470180c611 staging: comedi: usbdux: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott
5fd4b711be staging: comedi: s626: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently in the "s626" module when dealing with
sample values.

Rewrite `s626_reg_to_uint()` as it can be done with a one-liner.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott
055a1e2c56 staging: comedi: rtd520: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types for sample value manipulations in the "rtd520" driver
for consistency.

Also replace the hand-coded munging of 2's complement sample values with
calls to `comedi_offset_munge()` and AND with `s->maxdata` to strip off
any extra sign bits.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
8bab0d680e staging: comedi: quatech_daqp_cs: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `daqp_interrupt()` to use unsigned sample values for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
5c174c41d8 staging: comedi: pcmuio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `pcmuio_handle_intr_subdev()` in the "pcmuio" module to use
unsigned sample values for consistency.

Also, make the order in which `pcmuio_handle_intr_subdev()` writes the
two sample values (each actually containing up to 16 1-bit sample
values) independent of the host byte ordering.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
f23b65a588 staging: comedi: pcmmio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `interrupt_pcmmio()` and `ai_rinsn()` in the "pcmmio" module to
use unsigned sample values for consistency.

Also, make the order in which `interrupt_pcmmio()` writes the two sample
values (each actually containing up to 16 1-bit sample values)
independent of the host byte ordering.

Note that this module is a mess, so please excuse the checkpatch
warnings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
4bf59ce248 staging: comedi: pcl818: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the interrupt data transfer functions in the "pcl818" module to
use unsigned types for consistency.

Also remove the `short *ai_data` member of `struct pcl818_private` as it
is only assigned to and otherwise unused.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
54d2dd8443 staging: comedi: pcl816: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the "pcl816" module to use unsigned types to handle samples for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott
8017c51305 staging: comedi: pcl812: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `transfer_from_dma_buf()` and `interrupt_pcl812_ai_dma()` in the
"pcl812" module to use `unsigned short` sample values for consistency.

Also remove the `short *ai_data` member of `struct pcl812_private` as it
is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott
b12bb4a5f3 staging: comedi: pcl711: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Don't cast the sample value parameter of `comedi_buf_put()` to `short`,
particularly as it has now been changed to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott
319b67ae1c staging: comedi: ni_pcidio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `nidio_interrupt()` to use unsigned types for sample values
(actually bit-vectors of 1-bit sample values) instead of signed types.

Also rename the `AuxData` variable to `auxdata` and change it from
`long` to `unsigned int` as it only needs to hold a 32-bit value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott
3a2b101cc5 staging: comedi: ni_mio_common: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_fifo_buffer[]` element of `struct
ni_board_struct` and the types of various local variables from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott
c0edd2c627 staging: comedi: ni_labpc: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `labpc_ai_cmd()` from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott
2fb5cd385c staging: comedi: ni_at_a2150: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `dma_buffer` member of `struct a2150_private`
from `s16 *` to `uint16_t *`, and change the type of the `dpnt` variable
in `a2150_interrupt()` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott
ac2832f859 staging: comedi: me4000: sample types are unsigned (and not long!)
Sample values in comedi are generally represented as unsigned values.
Change the types of various variables in the "me4000" driver dealing
with samples to use unsigned types for consistency.

Also replace the `long` or `unsigned long` variables used to handle
32-bit register values to `unsigned int`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott
22d1b0650a staging: comedi: icp_multi: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
icp_multi_private` from `short` to `unsigned short` for consistency.

Also remove the `ai_data` and `di_data` members as they are not used.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott
58f91823de staging: comedi: fl512: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_readback[]` member of `struct
fl512_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott
37a96e994c staging: comedi: dt3000: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `dt3k_ai_empty_fifo()` from
`short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:23 -07:00
Ian Abbott
766b1f95cf staging: comedi: dt282x: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change various members of `struct dt282x_private` and various parameters
and variables dealing with samples to use `unsigned short` instead of
`short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott
65a62aaec2 staging: comedi: das1800: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `ao_update_bits` member of `struct
das1800_private` and the types of various local variables used to hold
sample values from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott
eabbf3f43f staging: comedi: das16m1: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_buffer[]` member of `struct
das16m1_private_struct` and the types used by `munge_sample()` and
`munge_sample_array()` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott
920983458c staging: comedi: das16: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `das16_ai_munge()` from `short
*` to `unsigned short *` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
0522063806 staging: comedi: cb_pcidas64: sample types are unsigned
Sample values in comedi are unsigned.  Change the element type of
`ao_bounce_buffer[]` in `struct pcidas64_private` from `short` to
`unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
79e3b11987 staging: comedi: cb_pcidas: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the element types of `ai_buffer[]`, `ao_buffer[]` and
`ao_value[]` in `struct cb_pcidas_private` to `unsigned short` for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
863e52769d staging: comedi: amplc_pci230: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Replace all uses of `short` to handle sample values in the
"amplc_pci230" driver with `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
b6b40b67a9 staging: comedi: amplc_pci224: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `ao_scan_vals` member of `struct pci224_private`
from `short *` to `unsigned short *` for consistency.  Also change the
type of the `array` variable in `pci224_ao_munge()` from `short *` to
`unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
6916308938 staging: comedi: adv_pci1723: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1723_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott
e3a9e513c6 staging: comedi: adv_pci1710: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1710_private` from `short` to `unsigned short` for consistency.  Also
remove the `ai_data` member as it is only assigned to.  Change various
local variables used to hold sample values to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott
6cda0d26b1 staging: comedi: adl_pci9118: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the `ao_data[]` and `dmabuf_virt[]` members of `struct
pci9118_private` and various local variables dealing with sample values
to use `unsigned short` instead of `short` for consistency.

Also remove the `short *ai_data` member of `struct pci9118_private` as
it is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott
b909ba8f8b staging: comedi: adl_pci9111: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_bounce_buffer[]` member of `struct
pci9111_private_data` from `short` to `unsigned short` for consistency.
Also change the type of the `array` variable in `pci9111_ai_munge()`
from `short *` to `unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott
58a37d4186 staging: comedi: addi_apci_3120: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of `ul_DmaBufferVirtual[2]` in `struct
addi_private` from `short *` to `unsigned short *` for consistency.
Note that several ADDI-DATA drivers use this struct from
"addi_common.h", but only the "addi_apci_3120" driver uses this member.
Also change the type of the `dma_buffer` parameter of
`v_APCI3120_InterruptDmaMoveBlock16bit()` from `short *` to `unsigned
short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott
830e273c0e staging: comedi: 8255: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
`subdev_8255_interrupt()` calls `comedi_buf_put()` with a `short` data
value merely because that's what was previously expected.  Since it now
expects an `unsigned short`, change it here for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott
ca05b81334 staging: comedi: use unsigned sample in cfc_write_to_buffer()
Sample values in comedi are generally represented as unsigned values.
`cfc_write_to_buffer()` in "comedi_fc.h" currently uses `short` to hold
a 16-bit sample value to be written to the buffer.  Change the type of
the parameter to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Ian Abbott
0a6fd02c1c staging: comedi: use unsigned samples for comedi_buf_put()/get()
Sample values in comedi are generally represented as unsigned values.
`comedi_buf_put()` and `comedi_buf_get()` use a `short` to hold the
16-bit data value being transferred to or from the comedi buffer.
Change them to use `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Malcolm Priestley
3ba0938c16 staging: vt6656: rxtx.c s_vFillTxKey replace u8 *pbyBuf.
Replace with struct vnt_tx_fifo_head and attach pbyBuf to
adwTxKey[0]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:45:50 -07:00
Malcolm Priestley
ecd80240af staging: vt6656: rxtx.c clean up s_uGetRTSCTSDuration
White space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley
3dec8f1654 staging: vt6656: rxtx.c s_uGetRTSCTSDuration allow fall-through duplicates
Allow switch fall-through of duplicate case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley
f84cdf65a7 staging: vt6656: rxtx.c s_bPacketToWirelessUsb set fallback tx rates
Set the two TX fall back rates in s_bPacketToWirelessUsb and
pass to private area of driver in variables tx_rate_fb0
and tx_rate_fb1 from the wFB_Opt0/wFB_Opt1 array.

Apply these rates were needed in the TX structure and
remove byFBOption settings in s_uGetRTSCTSDuration.

This greatly simplifies s_uGetRTSCTSDuration and
more future flexibility of setting rates from
upper levels of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:36 -07:00
Lars-Peter Clausen
889a62ba6d staging:iio:ade7758: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen
75b19bbf22 staging:iio:ad5933: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen
29da147245 staging:iio:simple-dummy: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:15:40 +01:00
Lars-Peter Clausen
7197812187 staging:iio:mxs-lradc: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Lars-Peter Clausen
77e587f676 staging:iio:lis3l02dq: Remove redundant call to iio_sw_buffer_preenable().
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Archana kumari
4a75ffa8ad staging:dgnc:Fixes use of deprecated headers in dgnc_cls.c
Fixes use of deprecated header <asm/io.h> in staging:dgnc:dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:42:42 -07:00
Teodora Baluta
57a8852912 Staging: rtl8192u: fix checkpatch.pl error
This patch fixes the checkpatch.pl script error:
ERROR: do not use C99 // comments
+static long ieee80211_translate_todbm(u8 signal_strength_index)// 0-100
index.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:40:30 -07:00
Teodora Baluta
46326d2622 Staging: rtl8192u: fix sparse warnings for static functions
Fix sparse warnings in static function in driver rtl8192u

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:39:32 -07:00
Kelley Nielsen
4b31e1f8ff staging: ft1000: change scram_dnldr() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:13 -07:00
Kelley Nielsen
456ae7ebfd staging: ft1000: change write_block_fifo() header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen
69f7be1fba staging: ft1000: change write_blk header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen
b30f4e234f staging: ft1000: change hdr_checksum() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen
9e80d03c75 staging: ft1000: change put_request_value() header to single line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Rashika Kheria
7ed57bca58 Staging: btmtk_usb: Fix Sparse Warning of incorrect type in assignment
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:676:39: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    expected unsigned int [unsigned] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    got restricted __le32 [usertype] <noident>

drivers/staging/btmtk_usb/btmtk_usb.c:736:31: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    expected unsigned int [unsigned] [addressable] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    got restricted __le32 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:32:28 -07:00
Nandini Hanumanthagowda
c744fd5fa8 staging: vt6656: Removed checkpatch whitespace errors
Removed whitespace related errors and warnings by removing
unnecessary spaces before new line in the quoted string
and spaces at start of any line or before tab to comply
with the coding style.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Nandini Hanumanthagowda
a96f5ba6f9 staging: vt6656: removed space related checkpatch warnings
Removed spaces around operators where it was not required
as per coding style
Added spaces around operators where it was necessary as
per coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Linus Walleij
263c43a447 Linux 3.12-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJSUc9zAAoJEHm+PkMAQRiG9DMH/AtpuAF6LlMRPjrCeuJQ1pyh
 T0IUO+CsLKO6qtM5IyweP8V6zaasNjIuW1+B6IwVIl8aOrM+M7CwRiKvpey26ldM
 I8G2ron7hqSOSQqSQs20jN2yGAqQGpYIbTmpdGLAjQ350NNNvEKthbP5SZR5PAmE
 UuIx5OGEkaOyZXvCZJXU9AZkCxbihlMSt2zFVxybq2pwnGezRUYgCigE81aeyE0I
 QLwzzMVdkCxtZEpkdJMpLILAz22jN4RoVDbXRa2XC7dA9I2PEEXI9CcLzqCsx2Ii
 8eYS+no2K5N2rrpER7JFUB2B/2X8FaVDE+aJBCkfbtwaYTV9UYLq3a/sKVpo1Cs=
 =xSFJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.12-rc4' into devel

Linux 3.12-rc4
2013-10-16 10:05:53 +02:00