openwrt/staging/blogic.git
9 years agostaging: wilc1000: fix return type of host_int_set_WEPDefaultKeyID
Chaehyun Lim [Mon, 26 Oct 2015 00:44:42 +0000 (09:44 +0900)]
staging: wilc1000: fix return type of host_int_set_WEPDefaultKeyID

This patch changes return type of host_int_set_WEPDefaultKeyID from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type int as well as data
type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge 4.3-rc7 into staging-next
Greg Kroah-Hartman [Tue, 27 Oct 2015 00:13:38 +0000 (09:13 +0900)]
Merge 4.3-rc7 into staging-next

We want the other staging patches in this branch as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: Remove boolean comparision
Punit Vara [Sat, 24 Oct 2015 22:31:25 +0000 (04:01 +0530)]
Staging: wilc1000: Remove boolean comparision

This patch is to the host_interface.c file that fixes up following
warning reported by coccicheck:

WARNING: Comparison to bool

Boolean tests do not need explicit comparison to true or false

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: amso1100: Drop unnecessary goto
Amitoj Kaur Chawla [Sat, 24 Oct 2015 16:39:05 +0000 (22:09 +0530)]
staging: rdma: amso1100: Drop unnecessary goto

Deletes the jump to a label on the next line when the label isn't used
anywhere else.

The semantic patch used to find this is:

// <smpl>
@r@
identifier l;
@@

-if (...) goto l;
-l:
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: hfi1: chip: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:43:23 +0000 (16:13 +0530)]
staging: rdma: hfi1: chip: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: mt29f_spinand: Prefer using the BIT macro
Eva Rachel Retuya [Sat, 24 Oct 2015 14:35:47 +0000 (22:35 +0800)]
Staging: mt29f_spinand: Prefer using the BIT macro

Replace all instances of bit shifting on 1 with the BIT(x) macro. In
addition, convert other non-1 shift operations with the equivalent
BIT(x) macro for uniformity. Issue pointed out by checkpatch.

CHECK: Prefer using the BIT macro

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: mt29f_spinand: Replace udelay function with usleep_range
Eva Rachel Retuya [Sat, 24 Oct 2015 17:24:51 +0000 (01:24 +0800)]
Staging: mt29f_spinand: Replace udelay function with usleep_range

Use 'usleep_range' instead of 'udelay' to elapse time. For
spinand_reset, define the upper limit by a factor of 2 to keep the wait
short while still allowing a "good enough" range for wakeup. Define the
range 250us - 1ms for spinand_cmdfunc to provide enough leeway before
issuing spinand_reset. Checkpatch found this issue.

CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ipath: ipath_init_chip: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:17:31 +0000 (15:47 +0530)]
staging: ipath: ipath_init_chip: Use setup_timer

Use of the timer API function setup_timer instead of init_timer, removing
the structure field assignments, and make the codeflow more readable.
The simplified sematic patch used is :-
<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ipath: ipath_sdma: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:17:32 +0000 (15:47 +0530)]
staging: ipath: ipath_sdma: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ipath: ipath_verbs: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:17:33 +0000 (15:47 +0530)]
staging: ipath: ipath_verbs: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ipath: ipath_driver: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:17:30 +0000 (15:47 +0530)]
staging: ipath: ipath_driver: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.
The simplified semantic patch used is :-
<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: remove externs and include needed header file
Alison Schofield [Sat, 24 Oct 2015 04:33:34 +0000 (21:33 -0700)]
staging: r8723au: remove externs and include needed header file

Remove extern declaration and add include of header file to get same.

Addresses checkpatch.pl:
WARNING: externs should be avoided in .c files

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: replace explicit NULL comparisons with !
Alison Schofield [Sat, 24 Oct 2015 04:32:20 +0000 (21:32 -0700)]
staging: r8723au: replace explicit NULL comparisons with !

Replace explicit NULL comparison with ! operator to simplify code.

Addresses checkpatch.pl:
WARNING: Comparisons should place the constant on the right side of the
test

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: use kernel preferred style for commenting
Alison Schofield [Sat, 24 Oct 2015 04:28:00 +0000 (21:28 -0700)]
staging: r8723au: use kernel preferred style for commenting

Reworked comments per kernel coding style to improve readability.

Corrects checkpatch.pl:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: Do not use multiple blank lines.
Burcin Akalin [Fri, 23 Oct 2015 21:30:03 +0000 (00:30 +0300)]
staging: wlan-ng: Do not use multiple blank lines.

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: Remove multiple assignments
Burcin Akalin [Fri, 23 Oct 2015 19:12:14 +0000 (22:12 +0300)]
staging: speakup: Remove multiple assignments

Remove multiple assignments by factorizing them.Problem found using
checkpatch.pl
CHECK: multiple assignments should be avoided

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove unnecessary braces and tab spacing
Amitoj Kaur Chawla [Fri, 23 Oct 2015 18:14:48 +0000 (23:44 +0530)]
staging: vt6656: Remove unnecessary braces and tab spacing

This patch removes unnecessary braces around if-else single statement
blocks and unnecessary tab space aligning

Tool used is uncrustify.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Use put_unaligned_le32
Shraddha Barke [Fri, 23 Oct 2015 14:27:52 +0000 (19:57 +0530)]
Staging: rtl8723au: Use put_unaligned_le32

Introduce the use of function put_unaligned_le32.

A simplified version of Coccinelle semantic patch used -

@@ identifier tmp; expression ptr; expression y,e; type T; @@

- tmp = cpu_to_le32(y);

  <+... when != tmp
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le32(y,ptr);
  ...+>
? tmp = e

@@ type T; identifier tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix voltage settings for C-Berry28
Dennis Menschel [Wed, 21 Oct 2015 21:16:56 +0000 (23:16 +0200)]
staging: fbtft: fix voltage settings for C-Berry28

This patch fixes some internal voltage settings for the C-Berry28 display.
The original example source files for the C-Berry28 as provided by
its vendor admatec contained six issues where a command parameter's value
didn't match its corresponding comment.
I've informed admatec about these discrepancies on 2015-08-25. In the
meantime, I've assumed the comments to be more reliable than the code,
and thus have used these values to write the initial C-Berry28 driver.
After having received a reply from admatec on 2015-10-16 that the issues
have been fixed in their example code, it has turned out that for the
voltages VCOM and AVDD, the code was indeed correct, but the comments
were wrong. This patch is meant to fix these two pending mistakes.

Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: use init function instead of init sequence
Dennis Menschel [Wed, 21 Oct 2015 21:16:55 +0000 (23:16 +0200)]
staging: fbtft: use init function instead of init sequence

This patch converts the default init sequence of the ST7789V
display controller into an init function, as init sequences
are considered deprecated by the maintainers of fbtft.

Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: remove redundant set_addr_win() function
Dennis Menschel [Wed, 21 Oct 2015 21:16:54 +0000 (23:16 +0200)]
staging: fbtft: remove redundant set_addr_win() function

This patch removes the function set_addr_win() from fb_st7789v.c, as its
definition is redundant to the default implementation fbtft_set_addr_win()
which can be found in fbtft-core.c.

Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: use MIPI DCS for ST7789V and C-Berry28
Dennis Menschel [Wed, 21 Oct 2015 21:16:53 +0000 (23:16 +0200)]
staging: fbtft: use MIPI DCS for ST7789V and C-Berry28

This patch makes use of the standard MIPI Display Command Set to remove
redundant entries from the command enum of the ST7789V display controller
and also some of the magic constants found in the init sequence of the
C-Berry28 display.

Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: add & use local variable to simplify references
Alison Schofield [Wed, 21 Oct 2015 06:09:37 +0000 (23:09 -0700)]
staging: r8723au: add & use local variable to simplify references

Add local variable scanned_queue to rtw_createbss_cmd23a_callback()
and use it (5x) to simplify references.

Addresses checkpatch.pl WARNING: line over 80 characters

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: move constant to right of comparison test
Alison Schofield [Wed, 21 Oct 2015 06:08:27 +0000 (23:08 -0700)]
staging: r8723au: move constant to right of comparison test

Move constant to right of comparison test to improve readability.

Addresses checkpatch.pl:
WARNING: Comparisons should place the constant on the
right side of the test

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: replace printk() with netdev_err()
Alison Schofield [Wed, 21 Oct 2015 06:06:45 +0000 (23:06 -0700)]
staging: r8723au: replace printk() with netdev_err()

Replace printk() with netdev_err() for uniform error reporting.
Issue found by checkpatch.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Add space around '*'
Burcin Akalin [Thu, 22 Oct 2015 12:15:39 +0000 (15:15 +0300)]
staging: vt6655: Add space around '*'

Add space around operator '*'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Add space around '*'
Burcin Akalin [Wed, 21 Oct 2015 21:48:29 +0000 (00:48 +0300)]
staging: vt6655: Add space around '*'

Add space around operator '*'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_wlan_util: fix misleading indentation
Luis de Bethencourt [Wed, 21 Oct 2015 17:32:38 +0000 (18:32 +0100)]
staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation

For loop is outside of the else branch of the above conditional statement.
Fixing misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8723au/core/rtw_wlan_util.c:528
WMMOnAssocRsp23a() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Replace kmalloc with kmalloc_array
Cristina Moraru [Wed, 21 Oct 2015 17:00:49 +0000 (20:00 +0300)]
staging: rtl8712: Replace kmalloc with kmalloc_array

Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
number_of_elements * size_of_element

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: netlogic: Do not use multiple blank lines.
Burcin Akalin [Tue, 20 Oct 2015 20:29:31 +0000 (23:29 +0300)]
staging: netlogic: Do not use multiple blank lines.

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: add spaces around binary operator '|'
Ioana Ciornei [Wed, 21 Oct 2015 20:17:56 +0000 (23:17 +0300)]
staging: dgap: add spaces around binary operator '|'

This patch adds spaces around binary operator '|'.
Done with coccinelle semantic patch:

@@
identifier x, y, z;
@@
(
- x|y|z
+ x | y | z
|
- x|y
+ x | y
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: remove unnecessary brackets
Ioana Ciornei [Wed, 21 Oct 2015 20:17:55 +0000 (23:17 +0300)]
staging: dgap: remove unnecessary brackets

This patch removes unnecessary brackets when dealing with
unary operators like '&'.
Done with coccinelle semantic patch:

@@
expression e;
@@

(
- &(e)
+ &e
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: remove unnecessary space after cast
Ioana Ciornei [Wed, 21 Oct 2015 20:17:54 +0000 (23:17 +0300)]
staging: dgap: remove unnecessary space after cast

This patch removes unnecessary spaces after the cast.
Patch done with coccinelle semantic patch:

@rule0@
type t;
identifier e;
constant c;
expression expr;
@@

(
- (t) e
+ (t)e
|
- (t) c
+ (t)c
|
- (t) expr
+ (t)expr
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: properly indent to match open paranthesis
Ioana Ciornei [Wed, 21 Oct 2015 20:17:53 +0000 (23:17 +0300)]
staging: dgap: properly indent to match open paranthesis

Indent parameters and arguments passed to function calls to match
open paranthesis

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: remove unnecessary blank lines
Ioana Ciornei [Wed, 21 Oct 2015 20:17:52 +0000 (23:17 +0300)]
staging: dgap: remove unnecessary blank lines

This patch removes the unnecessary blank lines before a closed
bracket and after an open bracket.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: magnetometer: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:47 +0000 (22:55 +0300)]
staging: iio: magnetometer: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: gyro: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:46 +0000 (22:55 +0300)]
staging: iio: gyro: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: trigger: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:45 +0000 (22:55 +0300)]
staging: iio: trigger: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: frequency: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:44 +0000 (22:55 +0300)]
staging: iio: frequency: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: cdc: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:43 +0000 (22:55 +0300)]
staging: iio: cdc: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:42 +0000 (22:55 +0300)]
staging: iio: accel: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: meter: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:41 +0000 (22:55 +0300)]
staging: iio: meter: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: light: Remove explicit comparisons
Cristina Moraru [Tue, 20 Oct 2015 19:55:40 +0000 (22:55 +0300)]
staging: iio: light: Remove explicit comparisons

Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoskein: fix coding style
Anton Tatuev [Thu, 22 Oct 2015 15:37:30 +0000 (18:37 +0300)]
skein: fix coding style

Added spaces around binary operators.

Signed-off-by: Tatuev Anton <tatuev.a.a@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: skein: Add space around '%'
Burcin Akalin [Thu, 22 Oct 2015 13:25:08 +0000 (16:25 +0300)]
staging: skein: Add space around '%'

Add space around operator '%'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '%' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon: Do not use multiple blank lines.
Burcin Akalin [Thu, 22 Oct 2015 21:01:35 +0000 (00:01 +0300)]
staging: octeon: Do not use multiple blank lines.

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines".

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: Replace kmalloc with kmalloc_array
Cristina Moraru [Wed, 21 Oct 2015 17:00:50 +0000 (20:00 +0300)]
staging: octeon-usb: Replace kmalloc with kmalloc_array

Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
number_of_elements * size_of_element

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon: Remove explicit NULL comparison
Muhammad Falak R Wani [Mon, 19 Oct 2015 19:27:39 +0000 (00:57 +0530)]
staging: octeon: Remove explicit NULL comparison

Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon: Remove explicit NULL comparison
Muhammad Falak R Wani [Mon, 19 Oct 2015 19:27:38 +0000 (00:57 +0530)]
staging: octeon: Remove explicit NULL comparison

Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: spaces preferred around operands
Luis de Bethencourt [Mon, 19 Oct 2015 17:16:01 +0000 (18:16 +0100)]
staging: rtl8712: spaces preferred around operands

Clean up all instances of checkpatch.pl checks:
CHECK: spaces preferred around that '+'
(and other operands)

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: braces should be used on all arms
Luis de Bethencourt [Mon, 19 Oct 2015 17:15:29 +0000 (18:15 +0100)]
staging: rtl8712: braces should be used on all arms

Fix all instances of the following checkpatch.pl check:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Remove boolean comparisons
Luis de Bethencourt [Mon, 19 Oct 2015 17:14:29 +0000 (18:14 +0100)]
staging: rtl8712: Remove boolean comparisons

Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ion: Remove explicit NULL comparison
Muhammad Falak R Wani [Mon, 19 Oct 2015 17:07:51 +0000 (22:37 +0530)]
staging: ion: Remove explicit NULL comparison

Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: fix misleading indentation
Luis de Bethencourt [Wed, 21 Oct 2015 17:29:59 +0000 (18:29 +0100)]
staging: rtl8188eu: fix misleading indentation

Code is correct, i needs to be moved back by 2 to correct for the last
iteration of the while loop, since READ_NEXT_PAIR advances two. Fixing
the misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8188eu/hal/rf_cfg.c:217
rtl88e_phy_config_rf_with_headerfile() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8188eu : BIT() macro cleanup
Anish Bhatt [Mon, 19 Oct 2015 05:51:41 +0000 (22:51 -0700)]
rtl8188eu : BIT() macro cleanup

Use the BIT(x) macro directly instead using multiple
BITX defines.

Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: _rtl92e_fw_boot_cpu: Remove unneeded goto
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:30 +0000 (22:00 +0200)]
staging: rtl8192e: _rtl92e_fw_boot_cpu: Remove unneeded goto

Drop ugly label as no resource cleanup is needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: fw: Use netdev_dbg instead of RT_TRACE
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:29 +0000 (22:00 +0200)]
staging: rtl8192e: fw: Use netdev_dbg instead of RT_TRACE

Drop legacy logging system.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove _rtl92e_fw_download_code()
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:28 +0000 (22:00 +0200)]
staging: rtl8192e: Remove _rtl92e_fw_download_code()

Reuse  rtl92e_send_cmd_pkt() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Swap firmware endian in _rtl92e_fw_prepare()
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:27 +0000 (22:00 +0200)]
staging: rtl8192e: Swap firmware endian in _rtl92e_fw_prepare()

Remove endian swap from  _rtl92e_fw_download_code(),
this way it can be replaced with _rtl92e_send_cmd_pkt().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Add _rtl92e_fw_prepare
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:26 +0000 (22:00 +0200)]
staging: rtl8192e: Add _rtl92e_fw_prepare

Add function to request and prepare firmware image.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Add _rtl92e_wait_for_fw()
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:25 +0000 (22:00 +0200)]
staging: rtl8192e: Add _rtl92e_wait_for_fw()

Add function waiting for firmware load/boot;
Remove _rtl92e_is_fw_ready() that is obsolete (can be replaced
with  _rtl92e_wait_for_fw().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: init_fw: Drop unneded check
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:24 +0000 (22:00 +0200)]
staging: rtl8192e: init_fw: Drop unneded check

rst_opt is always equal to OPT_SYSTEM_RESET in this scope.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Rename rt_firmware::firmware_status to status
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:23 +0000 (22:00 +0200)]
staging: rtl8192e: Rename rt_firmware::firmware_status to status

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Add rt_fw_blob
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:22 +0000 (22:00 +0200)]
staging: rtl8192e: Add rt_fw_blob

rt_fw_blob contains single firmware blob and its size.
Update firmware loading code accordingly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: cmd_pkt: Handle INIT packets
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:21 +0000 (22:00 +0200)]
staging: rtl8192e: cmd_pkt: Handle INIT packets

Add support for DESC_PACKET_TYPE_INIT to rtl92e_send_cmd_pkt().
With this generalization, _rtl92e_fw_download_code() may be removed
after slight modification.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Use macro to represent fragmentation threshold
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:20 +0000 (22:00 +0200)]
staging: rtl8192e: Use macro to represent fragmentation threshold

Add CMDPACKET_FRAG_SIZE macro and use it as fragmentation threshold
in send_cmd_pkt functions.
This makes rt_firmware::cmdpacket_frag_thresold and
 rtl92e_init_fw_param() obsolete.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: cmdpkt: Pass data as const void*
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:19 +0000 (22:00 +0200)]
staging: rtl8192e: cmdpkt: Pass data as const void*

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: cmdpkt: Reorder arguments
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:18 +0000 (22:00 +0200)]
staging: rtl8192e: cmdpkt: Reorder arguments

Use send_cmd_pkt(dev, type, data , size) order to avoid confusion

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: cmdpkt: Simplify argument names
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:17 +0000 (22:00 +0200)]
staging: rtl8192e: cmdpkt: Simplify argument names

Rename:
codevirtualaddress -> data
buffer_len -> len
packettype -> type

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: cmdpkt: Use packettype properly
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:16 +0000 (22:00 +0200)]
staging: rtl8192e: cmdpkt: Use packettype properly

rtl92e_send_cmd_pkt used hardcoded NORMAL packet type.

As it may be used to send other packet types as well - use
provided packet type instead of defaults.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl_dm: Use proper packet type
Mateusz Kulikowski [Mon, 19 Oct 2015 20:00:15 +0000 (22:00 +0200)]
staging: rtl8192e: rtl_dm: Use proper packet type

rtl92e_send_cmd_packet sends only NORMAL packets, passing
invalid type (even it it's ignored) is confusing.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: emxx_udc: Add space around operator.
Navya Sri Nizamkari [Mon, 19 Oct 2015 06:54:39 +0000 (12:24 +0530)]
Staging: emxx_udc: Add space around operator.

Add a space around '>>' operator.
Problem found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc: Remove boolean comparisons
Luis de Bethencourt [Sun, 18 Oct 2015 21:59:18 +0000 (22:59 +0100)]
staging: emxx_udc: Remove boolean comparisons

Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: remove obsolete driver
Deepa Dinamani [Thu, 22 Oct 2015 01:42:37 +0000 (18:42 -0700)]
staging: ft1000: remove obsolete driver

Remove support for Qleadtek Flash-OFDM modems. Telecom carrier is
discontinuing service for the radio technology.
See http://www.gtigroup.org/news/ind/2015-08-18/6996.html.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: tidy up pci9118_ai_setup_dma()
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:05 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: tidy up pci9118_ai_setup_dma()

For aesthetics, init the dmalen[01] local variables when they are declared.

Use a local variable, 'scan_bytes', for the (devpriv->ai_n_realscanlen << 1)
calculation. For aesthetics and clarification, use comedi_bytes_per_sample()
instead of the '<< 1' shift to calculate the value.

The local variable 'i' is badly named. Remove it and use a local variable
'tmp' where it is used.

When checking the DMA buffer lengths for non-neverending commands the
scan length calculation, (devpriv->ai_n_realscanlen << 1) * cmd->stop_arg,
could overflow. Use and unsigned long long local variable to hold the
calculation and avoid the overflow.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: rename interrupt_*() functions
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:04 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: rename interrupt_*() functions

For aesthetics, rename these functions so it they namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: rename move_block_from_dma()
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:03 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: rename move_block_from_dma()

Rename this function so it has namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: rename valid_samples_in_act_dma_buf()
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:02 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: rename valid_samples_in_act_dma_buf()

Rename this function so it has namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: rename interrupt_pci9118_ai_mode4_switch()
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:01 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: rename interrupt_pci9118_ai_mode4_switch()

For aesthetics, remove "interrupt_" from this functions name to shorten
it a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: remove PCI9118_CHANLEN
H Hartley Sweeten [Mon, 19 Oct 2015 20:13:00 +0000 (13:13 -0700)]
staging: comedi: adl_pci9118: remove PCI9118_CHANLEN

This define is only used to initialize the analog input sudevice
'len_chanlist'. Remove the define and just open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: remove unused defines
H Hartley Sweeten [Mon, 19 Oct 2015 20:12:59 +0000 (13:12 -0700)]
staging: comedi: adl_pci9118: remove unused defines

These defines are not used in the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: tidy up check_channel_list()
H Hartley Sweeten [Mon, 19 Oct 2015 20:12:58 +0000 (13:12 -0700)]
staging: comedi: adl_pci9118: tidy up check_channel_list()

Rename this function to give it namespace associated with the driver.

Currently this function is called by both the AI (*do_cmdtest) and the (*do_cmd)
functions. It really only needs to be called by the (*do_cmdtest) to validate
that the chanlist meets the requirements of the hardware. It's only called by
the (*do_cmd) to verify that the scan length is not to large after adding the
extra samples needed to satisfy the DMA.

Move the extra scan length check into the (*do_cmd) function and remove the
unnecessary parameters 'frontadd' and 'backadd'.

Tidy up the reset of the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: remove unnecessary check in check_channel_list()
H Hartley Sweeten [Mon, 19 Oct 2015 20:12:57 +0000 (13:12 -0700)]
staging: comedi: adl_pci9118: remove unnecessary check in check_channel_list()

Step 3 of the AI (*do_cmdtest) validates that the cmd->chanlist_len is >= 1. If
it's not the (*do_cmdtest) fails and check_channel_list() is never called. This
This function is also called by the AI (*do_cmd) and the comedi core ensures
that the async command has a valid chanlist. Remove the unnecessary 'n_chan'
check.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: TRIG_INT is not vaild for scan_begin_src
H Hartley Sweeten [Mon, 19 Oct 2015 20:12:56 +0000 (13:12 -0700)]
staging: comedi: adl_pci9118: TRIG_INT is not vaild for scan_begin_src

The (*do_cmdtest) in this driver validated the scan_begin_src as being
TRIG_FOLLOW | TRIG_TIMER | TRIG_EXT. The TRIG_INT source is not valid.

Remove the Step 2 mutual compatibility check that makes sure that TRIG_INT
is only used for the start_src or the scan_begin_src.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: Fix return flow
Cristina Moraru [Tue, 20 Oct 2015 10:16:33 +0000 (13:16 +0300)]
staging: comedi: Fix return flow

Simplify function return flow. Issue found
with coccinelle.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: update MODULE_DESCRIPTION
H Hartley Sweeten [Mon, 19 Oct 2015 16:44:02 +0000 (09:44 -0700)]
staging: comedi: cb_pcidas: update MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: fix cb_pcidas_ao_nofifo_insn_write()
H Hartley Sweeten [Mon, 19 Oct 2015 16:44:01 +0000 (09:44 -0700)]
staging: comedi: cb_pcidas: fix cb_pcidas_ao_nofifo_insn_write()

The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: fix cb_pcidas_ao_fifo_insn_write()
H Hartley Sweeten [Mon, 19 Oct 2015 16:44:00 +0000 (09:44 -0700)]
staging: comedi: cb_pcidas: fix cb_pcidas_ao_fifo_insn_write()

The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: remove superfluous comment
H Hartley Sweeten [Mon, 19 Oct 2015 16:43:59 +0000 (09:43 -0700)]
staging: comedi: cb_pcidas: remove superfluous comment

The ao (*cancel) function does not need commented.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: absorb cal_enable_bits()
H Hartley Sweeten [Mon, 19 Oct 2015 16:43:58 +0000 (09:43 -0700)]
staging: comedi: cb_pcidas: absorb cal_enable_bits()

This inline function just returns the bits needd to enable
a calibration source. For aethetics, absorb it into the callers.
Sorten the variable name in the private data used to hold the
current calibration source.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: consolidate interrupt clear code
H Hartley Sweeten [Mon, 19 Oct 2015 16:43:57 +0000 (09:43 -0700)]
staging: comedi: cb_pcidas: consolidate interrupt clear code

The analog output and analog input interrupts are currently cleared
as they are handled. Refactor the code to gather all the bits needed
to clear the interrupts and do it once at the end of the interrupt
handler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: split ai code out of interrupt handler
H Hartley Sweeten [Mon, 19 Oct 2015 16:43:56 +0000 (09:43 -0700)]
staging: comedi: cb_pcidas: split ai code out of interrupt handler

Clarify the interrupt handler by splitting the analog input handling
into a new function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: make ni_tio_has_gate2_registers return boolean
Geliang Tang [Sun, 18 Oct 2015 14:35:30 +0000 (22:35 +0800)]
staging: comedi: make ni_tio_has_gate2_registers return boolean

This patch makes ni_tio_has_gate2_registers return boolean, since
this function only uses either one or zero as its return value.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192e: Use module_pci_driver
Ksenija Stanojevic [Mon, 19 Oct 2015 16:49:12 +0000 (18:49 +0200)]
Staging: rtl8192e: Use module_pci_driver

Use module_pci_driver for drivers whose init and exit functions only
register and unregister, respectively.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Add device ID for Sitecom WLA2100
Larry Finger [Mon, 19 Oct 2015 03:14:48 +0000 (22:14 -0500)]
staging: rtl8712: Add device ID for Sitecom WLA2100

This adds the USB ID for the Sitecom WLA2100. The Windows 10 inf file
was checked to verify that the addition is correct.

Reported-by: Frans van de Wiel <fvdw@fvdw.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Frans van de Wiel <fvdw@fvdw.eu>
Cc: Stable <stable@vger.kernel.org> [All stable versions]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: xgifb: Remove space after cast
Navya Sri Nizamkari [Thu, 22 Oct 2015 16:50:15 +0000 (22:20 +0530)]
Staging: xgifb: Remove space after cast

This patch fixes the checkpatch check:

CHECK: No space is necessary after a cast

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: xgifb: Fix comparison to NULL warning
Navya Sri Nizamkari [Thu, 22 Oct 2015 16:48:26 +0000 (22:18 +0530)]
Staging: xgifb: Fix comparison to NULL warning

Change comparison to NULL to a ! operation.
Found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: xgifb: Remove extra blank lines.
Navya Sri Nizamkari [Thu, 22 Oct 2015 16:47:24 +0000 (22:17 +0530)]
Staging: xgifb: Remove extra blank lines.

This patch fixes the checkpatch.pl check:

CHECK: Please don't use multiple blank lines

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: xgifb: Remove blank line before } and after {
Navya Sri Nizamkari [Thu, 22 Oct 2015 16:46:19 +0000 (22:16 +0530)]
Staging: xgifb: Remove blank line before } and after {

Remove blank line after { and before }.
Problem found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: xgifb: Replace udelay, mdelay functions with usleep_range
Navya Sri Nizamkari [Thu, 22 Oct 2015 14:51:22 +0000 (20:21 +0530)]
Staging: xgifb: Replace udelay, mdelay functions with usleep_range

This patch fixes the checkpatch.pl check:

CHECK: usleep_range is preferred over udelay.

Replace mdelay with usleep_range function too.
Add 1 millisecond to the delay time to get a
reasonable upper limit which saves one wakeup call.
Do same throughout the file.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>