openwrt/staging/blogic.git
11 years agostaging: speakup: remove unnecessary space before semicolon
Nandini Hanumanthagowda [Sun, 13 Oct 2013 10:51:07 +0000 (16:21 +0530)]
staging: speakup: remove unnecessary space before semicolon

Removed unnecessary space before semicolon which was
leading to checkpatch.pl warning.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: xgifb: remove space before semicolon
Ashvini Varatharaj [Sat, 12 Oct 2013 16:15:37 +0000 (21:45 +0530)]
Staging: xgifb: remove space before semicolon

Fix checkpatch warning: WARNING:space prohibited before semicolon

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ft1000-usb: remove space between function name and open paren in ft1000_down...
Kelley Nielsen [Sat, 12 Oct 2013 06:08:28 +0000 (23:08 -0700)]
staging: ft1000-usb: remove space between function name and open paren in ft1000_download.c

fixed checkpatch.pl warning: space prohibited between function name and
open parenthesis '('

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: Removed C99 style comments
Nandini Hanumanthagowda [Sat, 12 Oct 2013 16:58:08 +0000 (22:28 +0530)]
staging: vt6655: Removed C99 style comments

C99 style comment // should not be used as
per coding guidelines.Usage of C99 style
comment // was resulting in checkpatch.pl
error.Hence replaced it with block comment /* */

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: Removed redundant code from iwctl file
Nandini Hanumanthagowda [Sat, 12 Oct 2013 16:20:02 +0000 (21:50 +0530)]
staging: vt6656: Removed redundant code from iwctl file

There was one line which was added twice in the
definition of iwctl_handler and hence was redundant.
It was defined at line nos 1798 and 1818. Removed
the code at line 1818.
The redundant code was:
IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme)
which was defined twice.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: Remove unnecessary semicolons
Joe Perches [Thu, 10 Oct 2013 23:07:59 +0000 (16:07 -0700)]
staging: Remove unnecessary semicolons

These aren't necessary after switch, if and while statements.

Also remove some unnecessary braces where these
semicolons were removed around single statement
and some unnecessary blank lines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: crystalhd: use vfree() instead of kfree()
Wei Yongjun [Fri, 11 Oct 2013 04:39:28 +0000 (12:39 +0800)]
Staging: crystalhd: use vfree() instead of kfree()

Use vfree() instead of kfree() to free vmalloc()
allocated data.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use list.h for transactions
Aaro Koskinen [Thu, 10 Oct 2013 20:25:36 +0000 (23:25 +0300)]
staging: octeon-usb: use list.h for transactions

Use list.h helpers for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use list.h for pipes
Aaro Koskinen [Thu, 10 Oct 2013 20:25:35 +0000 (23:25 +0300)]
staging: octeon-usb: use list.h for pipes

Use list.h helpers for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use list_for_each_entry_safe()
Aaro Koskinen [Thu, 10 Oct 2013 20:25:34 +0000 (23:25 +0300)]
staging: octeon-usb: use list_for_each_entry_safe()

Use list_for_each_entry_safe() when deleting all list items.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use list_del_init()
Aaro Koskinen [Thu, 10 Oct 2013 20:25:33 +0000 (23:25 +0300)]
staging: octeon-usb: use list_del_init()

Replace list_del() + INIT_LIST_HEAD() with list_del_init().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use dynamic allocation for pipes
Aaro Koskinen [Thu, 10 Oct 2013 20:25:32 +0000 (23:25 +0300)]
staging: octeon-usb: use dynamic allocation for pipes

Use dynamic memory allocation for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use dynamic allocation for transactions
Aaro Koskinen [Thu, 10 Oct 2013 20:25:31 +0000 (23:25 +0300)]
staging: octeon-usb: use dynamic allocation for transactions

Use dynamic memory allocation for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: use a single .h file
Aaro Koskinen [Thu, 10 Oct 2013 20:25:30 +0000 (23:25 +0300)]
staging: octeon-usb: use a single .h file

Merge USBC and USBN register definitions into a single header
file. Although all HW definitions are purely internal to the driver,
it's better to keep them separate due to the large size of the file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtype
Aaro Koskinen [Thu, 10 Oct 2013 20:25:29 +0000 (23:25 +0300)]
staging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtype

Do the clock setup through p_rtype on all OCTEONs. This enables to get
rid of duplicated register definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xx
Aaro Koskinen [Thu, 10 Oct 2013 20:25:28 +0000 (23:25 +0300)]
staging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xx

Add the missing bits to common clk ctl definition, and we can delete
duplicated definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitions
Aaro Koskinen [Thu, 10 Oct 2013 20:25:27 +0000 (23:25 +0300)]
staging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitions

cvmx_usbnx_usbp_ctl_status was multiplied for different OCTEONS and all
those definitions are unused. Delete them.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: copy dot11d.h in ieee80211/dot11d.h and remove it
Xenia Ragiadakou [Thu, 10 Oct 2013 08:27:20 +0000 (11:27 +0300)]
staging: rtl8192u: copy dot11d.h in ieee80211/dot11d.h and remove it

This patch copies the content of dot11d.h into ieee80211/dot11d.h and then
removes it because practically the two header files are the same with the
difference that in dot11d.h some checkpatch warnings have been corrected.
This is done because the duplication of dot11d.h is unnecessary since the
structures and functions that defines are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove ieee80211_crypt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 08:27:19 +0000 (11:27 +0300)]
staging: rtl8192u: remove ieee80211_crypt.h

This patch removes ieee80211_crypt.h because this header file is the same as
ieee80211/ieee80211_crypt.h and the structures and functions declared in it
are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove r8180_pm.c and r8180_pm.h
Xenia Ragiadakou [Thu, 10 Oct 2013 08:27:18 +0000 (11:27 +0300)]
staging: rtl8192u: remove r8180_pm.c and r8180_pm.h

This patch removes r8180_pm.h and r8180_pm.c from rtl8192u because they
are not used anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix line size in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:44:01 +0000 (10:44 +0300)]
staging: rtl8192u: fix line size in r819xU_HTType.h

This patch fixes the following checkpatch warning in r819xU_HTType.h:
WARNING: line over 80 characters

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: add parenthesis around complex macros in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:44:00 +0000 (10:44 +0300)]
staging: rtl8192u: add parenthesis around complex macros in r819xU_HTType.h

This patch fixes the following checkpatch error:
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: add space after ',' in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:59 +0000 (10:43 +0300)]
staging: rtl8192u: add space after ',' in r819xU_HTType.h

This patch fixes the following checkpatch error:
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix alignment in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:58 +0000 (10:43 +0300)]
staging: rtl8192u: fix alignment in r819xU_HTType.h

This patch fixes some alignment issues in r819xU_HTType.h to impreove code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix comments in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:57 +0000 (10:43 +0300)]
staging: rtl8192u: fix comments in r819xU_HTType.h

This patch fixes comments in r819xU_HTType.h by:
* replacing // commments with /* */ comments
* removing author and date information from comments
* removing unnecessary comments

This is done to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix space around braces in r819xU_HTType.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:56 +0000 (10:43 +0300)]
staging: rtl8192u: fix space around braces in r819xU_HTType.h

This patch fixes the white space around braces in r819xU_HTType.h according
to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: use __packed instead of __attribute__((packed))
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:55 +0000 (10:43 +0300)]
staging: rtl8192u: use __packed instead of __attribute__((packed))

This patch fixes the following checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix open brace position in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:54 +0000 (10:43 +0300)]
staging: rtl8192u: fix open brace position in r819xU_cmdpkt.h

This patch fixes the following checkpatch warning and error:
WARNING: missing space after enum definition
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix alignment in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:53 +0000 (10:43 +0300)]
staging: rtl8192u: fix alignment in r819xU_cmdpkt.h

This patch fixes alignment issues in r819xU_cmdpkt.h to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix space after ( in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:52 +0000 (10:43 +0300)]
staging: rtl8192u: fix space after ( in r819xU_cmdpkt.h

This patch removes prohibited space after ( in r819xU_cmdpkt.h according to
the linux kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix space at the start of lines in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:51 +0000 (10:43 +0300)]
staging: rtl8192u: fix space at the start of lines in r819xU_cmdpkt.h

This patch fixes the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix comments in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:50 +0000 (10:43 +0300)]
staging: rtl8192u: fix comments in r819xU_cmdpkt.h

This patch fixes the comments in r819xU_cmdpkt.h by:
* removing any empty or unnecessary comments
* replacing the // comments with /* */ comments
* removing date and author information from comments

This is done to improve code readability and to conform to linux kernel
coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix line size in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:49 +0000 (10:43 +0300)]
staging: rtl8192u: fix line size in r819xU_cmdpkt.h

This patch reduces the line length below 80 chars to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: add space after } and , in r819xU_cmdpkt.h
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:48 +0000 (10:43 +0300)]
staging: rtl8192u: add space after } and , in r819xU_cmdpkt.h

This patch fixes white space after } and , so that the code becomes more
readable and conforms to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove #ifdef JOHN_
Xenia Ragiadakou [Thu, 10 Oct 2013 07:43:47 +0000 (10:43 +0300)]
staging: rtl8192u: remove #ifdef JOHN_

This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and
because the code inside them calls some undefined functions (e.g read_rtl8225,
rtl8187_read_phy etc).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: Use NULL instead of 0
Sachin Kamat [Wed, 9 Oct 2013 10:28:31 +0000 (15:58 +0530)]
staging: vt6655: Use NULL instead of 0

Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: Use NULL instead of 0
Sachin Kamat [Wed, 9 Oct 2013 10:28:30 +0000 (15:58 +0530)]
staging: rtl8192u: Use NULL instead of 0

Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lirc: Do not use 0 for NULL pointer
Sachin Kamat [Wed, 9 Oct 2013 10:28:29 +0000 (15:58 +0530)]
staging: lirc: Do not use 0 for NULL pointer

Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgnc: dgnc_tty: Do not use 0 for NULL pointer
Sachin Kamat [Wed, 9 Oct 2013 10:28:28 +0000 (15:58 +0530)]
staging: dgnc: dgnc_tty: Do not use 0 for NULL pointer

Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: Do not use 0 for NULL pointer in console.c
Sachin Kamat [Wed, 9 Oct 2013 10:28:27 +0000 (15:58 +0530)]
staging: lustre: Do not use 0 for NULL pointer in console.c

Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: midi: Use NULL instead of 0 for pointers
Sachin Kamat [Wed, 9 Oct 2013 10:28:26 +0000 (15:58 +0530)]
staging: line6: midi: Use NULL instead of 0 for pointers

Use NULL instead of 0 for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: dgap_tty: Do not use 0 for pointers
Sachin Kamat [Wed, 9 Oct 2013 10:28:25 +0000 (15:58 +0530)]
staging: dgap: dgap_tty: Do not use 0 for pointers

0 should not be used instead of NULL for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: dgap_fep5: Do not use 0 for NULL pointer
Sachin Kamat [Wed, 9 Oct 2013 10:28:24 +0000 (15:58 +0530)]
staging: dgap: dgap_fep5: Do not use 0 for NULL pointer

Do not compare NULL pointer with 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: dgap_fep5: Remove braces around return
Sachin Kamat [Wed, 9 Oct 2013 10:28:23 +0000 (15:58 +0530)]
staging: dgap: dgap_fep5: Remove braces around return

Braces are not needed around return values.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: dgap_fep5: Remove braces around single line statements
Sachin Kamat [Wed, 9 Oct 2013 10:28:22 +0000 (15:58 +0530)]
staging: dgap: dgap_fep5: Remove braces around single line statements

Single line statements do not require braces.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: s626: prefix macros in s626.h
Ian Abbott [Tue, 8 Oct 2013 18:06:42 +0000 (19:06 +0100)]
staging: comedi: s626: prefix macros in s626.h

Prefix the names of all the macros defined in "s626.h" with `S626_`.

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>
11 years agostaging: comedi: s626: prefix macros in s626.c
Ian Abbott [Tue, 8 Oct 2013 18:06:41 +0000 (19:06 +0100)]
staging: comedi: s626: prefix macros in s626.c

Prefix the macros defined in "s626.c" with `S626_`.  Macro `VECT0` is
unused, so remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: s626: prefix function and variable names
Ian Abbott [Tue, 8 Oct 2013 18:06:40 +0000 (19:06 +0100)]
staging: comedi: s626: prefix function and variable names

Add the prefix `s626_` to all the static variables and functions that
don't already have 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>
11 years agostaging: comedi: s626: rename struct buffer_dma
Ian Abbott [Tue, 8 Oct 2013 18:06:39 +0000 (19:06 +0100)]
staging: comedi: s626: rename struct buffer_dma

Re-tag `struct buffer_dma` to `struct s626_buffer_dma` to avoid
potential namespace clashes.

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>
11 years agostaging: comedi: s626: move struct buffer_dma
Ian Abbott [Tue, 8 Oct 2013 18:06:38 +0000 (19:06 +0100)]
staging: comedi: s626: move struct buffer_dma

Move the declaration of `struct buffer_dma` from "s626.h" to "s626.c" as
it seems more at home there.  After this move, "s626.h" just contains
macros related to hardware registers.

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>
11 years agostaging: comedi: s626: make trimchan[] and trimadrs[] const
Ian Abbott [Tue, 8 Oct 2013 18:06:37 +0000 (19:06 +0100)]
staging: comedi: s626: make trimchan[] and trimadrs[] const

Declare the static variables `trimchan[]` and `trimadrs[]` as constant
data.

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>
11 years agostaging: comedi: s626: add mmiowb() calls
Ian Abbott [Tue, 8 Oct 2013 18:06:36 +0000 (19:06 +0100)]
staging: comedi: s626: add mmiowb() calls

`s626_mc_enable()` is often called to enable some function in a control
register after setting up some other registers.  Precede the write to
the control register with a call to `mmiowb()` to preserve mmio write
ordering.

`s626_mc_disable()` is called to disable some function in a control
register and is often followed up by writes to other registers.  Follow
the write to the control register with a call to `mmiowb()` to preserve
mmio write ordering.

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>
11 years agostaging: comedi: s626: remove TRUE and FALSE macros
Ian Abbott [Tue, 8 Oct 2013 18:06:35 +0000 (19:06 +0100)]
staging: comedi: s626: remove TRUE and FALSE macros

"s626.h" defines the macros `TRUE` and `FALSE` if they are not already
defined, yielding the expected numeric values.  Remove the macros and
replace their usage with the values `true` and `false`, respectively.

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>
11 years agostaging: comedi: s626: move s626_enc_chan_info[]
Ian Abbott [Tue, 8 Oct 2013 18:06:34 +0000 (19:06 +0100)]
staging: comedi: s626: move s626_enc_chan_info[]

Move `s626_enc_chan_info[]` and remove its forward declaration.

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>
11 years agostaging: comedi: s626: move encoder functions part 3
Ian Abbott [Tue, 8 Oct 2013 18:06:33 +0000 (19:06 +0100)]
staging: comedi: s626: move encoder functions part 3

Move the final lot of encoder functions to help avoid the forward
declaration of `s626_enc_chan_info[]`.

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>
11 years agostaging: comedi: s626: move encoder functions part 2
Ian Abbott [Tue, 8 Oct 2013 18:06:32 +0000 (19:06 +0100)]
staging: comedi: s626: move encoder functions part 2

Move some more functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

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>
11 years agostaging: comedi: s626: move encoder functions part 1
Ian Abbott [Tue, 8 Oct 2013 18:06:31 +0000 (19:06 +0100)]
staging: comedi: s626: move encoder functions part 1

Move some functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

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>
11 years agostaging: comedi: s626: remove encpriv macro
Ian Abbott [Tue, 8 Oct 2013 18:06:30 +0000 (19:06 +0100)]
staging: comedi: s626: remove encpriv macro

The `encpriv` macro relies on a local variable `dev` (of type `struct
comedi_device *`) being set correctly.  By a convoluted path involving
the `private` data pointer of subdevice 5 (the encoder (counter)
subdevice), the macro always yields a pointer to the first element of
the static array `enc_private_data[]`.  That holds statically constant
data for each of 6 encoder channels.

Instead of using the `encpriv` macro, just access the array it points to
directly and get rid of the macro.  Don't bother initializing the
`private` member of the encoder subdevice any more.  Since
`enc_private_data[]` now has nothing to so with subdevice private data,
rename `enc_private_data[]` to `s626_enc_chan_info[]` and rename its
type from `struct enc_private` to `struct s626_enc_info`.  Since the
array contains unchanging, static information, declare it `const` and
declare all the variables that point to it `const`.

A forward declaration of `s626_enc_chan_info[]` has been added
temporarily and will be removed by a later patch.

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>
11 years agostaging: comedi: s626: rename CamelCase variables
Ian Abbott [Tue, 8 Oct 2013 18:06:29 +0000 (19:06 +0100)]
staging: comedi: s626: rename CamelCase variables

Rename the remaining CamelCase parameters and variables.

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>
11 years agostaging: comedi: s626: rename CamelCase functions
Ian Abbott [Tue, 8 Oct 2013 18:06:28 +0000 (19:06 +0100)]
staging: comedi: s626: rename CamelCase functions

Rename the remaining non-lower-case functions.

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>
11 years agostaging: comedi: s626: remove a variable from set_mode_a() and _b()
Ian Abbott [Tue, 8 Oct 2013 18:06:27 +0000 (19:06 +0100)]
staging: comedi: s626: remove a variable from set_mode_a() and _b()

The `set_mode_a()` and `set_mode_b()` functions use a local variable
`setup` which is initialized to the value of parameter `Setup` which is
not used further.  Get rid of the local variable and rename the
parameter to `setup`.

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>
11 years agostaging: comedi: s626: rename CamelCase in struct enc_private
Ian Abbott [Tue, 8 Oct 2013 18:06:26 +0000 (19:06 +0100)]
staging: comedi: s626: rename CamelCase in struct enc_private

Rename the CamelCase members of `struct enc_private`.  Since most of
those are function pointers pointing to functions with similar names as
the members, rename the functions they point to as well.

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>
11 years agostaging: comedi: s626: rename CamelCase in struct s626_private
Ian Abbott [Tue, 8 Oct 2013 18:06:25 +0000 (19:06 +0100)]
staging: comedi: s626: rename CamelCase in struct s626_private

Rename the CamelCase members of `struct s626_private`.

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>
11 years agostaging: comedi: s626: replace CamelCase struct bufferDMA
Ian Abbott [Tue, 8 Oct 2013 18:06:24 +0000 (19:06 +0100)]
staging: comedi: s626: replace CamelCase struct bufferDMA

Rename `struct bufferDMA` and its members to avoid CamelCase.

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>
11 years agostaging: comedi: s626: remove duplicate macros I2C_B0, I2C_B1, I2C_B2
Ian Abbott [Tue, 8 Oct 2013 18:06:23 +0000 (19:06 +0100)]
staging: comedi: s626: remove duplicate macros I2C_B0, I2C_B1, I2C_B2

The `I2C_B0(ATTR, VAL)`, `I2C_B1(ATTR, VAL)` and `I2C_B2(ATTR, VAL)`
macros are defined identically in "s626.h" and "s626.c".  Remove the
duplicates from "s626.c".

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>
11 years agostaging: comedi: s626: remove I2CR and I2CW macros
Ian Abbott [Tue, 8 Oct 2013 18:06:22 +0000 (19:06 +0100)]
staging: comedi: s626: remove I2CR and I2CW macros

The `I2CR` and `I2CW` macros expand to the I2C read and write addresses,
respectively.  They are only used in one place each and include the name
of a local variable `devpriv` in their expansion.

Get rid of the macros and expand them in place.

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>
11 years agostaging: comedi: s626: rename ai_continous
Ian Abbott [Tue, 8 Oct 2013 18:06:21 +0000 (19:06 +0100)]
staging: comedi: s626: rename ai_continous

Rename the `ai_continous` member of `struct s626_private` to
`ai_continuous`.

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>
11 years agostaging: comedi: s626: remove PCI ID defines
Ian Abbott [Tue, 8 Oct 2013 18:06:20 +0000 (19:06 +0100)]
staging: comedi: s626: remove PCI ID defines

The Sensoray 626 is based on the Philips SAA7146 chip using the Philips
vendor and device ID for the chip, but with custom subdevice and
subvendor IDs.  Use the Philips IDs in the PCI device table and replace
the macros for the subvendor and subdevice IDs with open-coded values.

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>
11 years agostaging: comedi: s626: remove unused DMAHandle
Ian Abbott [Tue, 8 Oct 2013 18:06:19 +0000 (19:06 +0100)]
staging: comedi: s626: remove unused DMAHandle

The `DMAHandle` member of `struct bufferDMA` in "s626.h" is unused, so
remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: s626: convert a printk()
Ian Abbott [Tue, 8 Oct 2013 18:06:18 +0000 (19:06 +0100)]
staging: comedi: s626: convert a printk()

Convert a printk() to a dev_err().

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>
11 years agostaging: comedi: s626: tidy up main source code file
Ian Abbott [Tue, 8 Oct 2013 18:06:17 +0000 (19:06 +0100)]
staging: comedi: s626: tidy up main source code file

Tidy up the source code in "s626.c" and make it (slightly) more
readable.  It's mostly whitespace changes although some large statements
have been split into smaller statements.  It fixes most of the
checkpatch errors and warnings.

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>
11 years agostaging: comedi: s626: tidy up comments at top of file
Ian Abbott [Tue, 8 Oct 2013 18:06:16 +0000 (19:06 +0100)]
staging: comedi: s626: tidy up comments at top of file

Make the comments at the top of the file conform to the CodingStyle.

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>
11 years agostaging: comedi: s626: tidy the header file a bit
Ian Abbott [Tue, 8 Oct 2013 18:06:15 +0000 (19:06 +0100)]
staging: comedi: s626: tidy the header file a bit

Tidy up the "s626.h" header file a bit, cleaning up the whitespace and
fixing overlength lines.  Add multiple inclusion protection (even though
it's only included once and only by "s626.c").  Remove unnecessary
driver comment near the start of the file as it is more or less the same
as the one in "s626.c".  Remove obviously unused/useless stuff.

I'm not sure what to do about the INTEL/MOTOROLA platform selection in
the file.  I've left it alone (set to INTEL) for now.

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>
11 years agostaging: drm/imx: Enable DRM PRIME support
Philipp Zabel [Thu, 10 Oct 2013 14:18:46 +0000 (16:18 +0200)]
staging: drm/imx: Enable DRM PRIME support

Lets the IPU driver make use of the PRIME functionality introduced
by the "drm: GEM CMA: Add DRM PRIME support" patch.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: add drm plane support
Philipp Zabel [Thu, 10 Oct 2013 14:18:45 +0000 (16:18 +0200)]
staging: drm/imx: add drm plane support

This patch adds support for a drm overlay plane on DI0 using the DP.
In principle, the overlay plane could also be used on DI1, but to switch
the overlay plane between display interfaces, the base planes would have
to be exchanged transparently while both display interfaces are inactive.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: fix pageflip events during device close
Sascha Hauer [Thu, 10 Oct 2013 14:18:44 +0000 (16:18 +0200)]
staging: drm/imx: fix pageflip events during device close

During a device close the drm core frees all pending events in
drm_events_release(). If at that time a pageflip is pending the
interrupt handler will try to complete the now unitialized
event resulting in a NULL pointer exception. Seen on imx-drm
when userspace is killed during a page flip.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: ipuv3-crtc: remove unused struct ipu_framebuffer
Philipp Zabel [Thu, 10 Oct 2013 14:18:43 +0000 (16:18 +0200)]
staging: drm/imx: ipuv3-crtc: remove unused struct ipu_framebuffer

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm-imx: add DRM_FORMAT_BGR888 to ipu crtc driver
Philipp Zabel [Thu, 10 Oct 2013 14:18:42 +0000 (16:18 +0200)]
staging: drm-imx: add DRM_FORMAT_BGR888 to ipu crtc driver

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: make waiting for idle channel optional
Sascha Hauer [Thu, 10 Oct 2013 14:18:41 +0000 (16:18 +0200)]
staging: drm/imx: make waiting for idle channel optional

Currently we wait for a channel until it's idle before actually
disabling it. This is not needed for all channels though, so make
waiting for idle a separate function and call it where necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: Add 24-bit BGR support to DC
Philipp Zabel [Thu, 10 Oct 2013 14:18:40 +0000 (16:18 +0200)]
staging: drm/imx: Add 24-bit BGR support to DC

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: add BGR565 format
Philipp Zabel [Thu, 10 Oct 2013 14:18:39 +0000 (16:18 +0200)]
staging: drm/imx: add BGR565 format

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: fix RGB formats, make ipu_cpmem_set_fmt take a drm_fourcc
Philipp Zabel [Thu, 10 Oct 2013 14:18:38 +0000 (16:18 +0200)]
staging: drm/imx: fix RGB formats, make ipu_cpmem_set_fmt take a drm_fourcc

The drm fourccs define formats not available as video4linux pixel formats,
such as DRM_FORMAT_BGR565, or the DRM_FORMAT_RGBX/BGRX variants.
Also, contrary to the v4l2 formats, the drm formats are well defined.

This patch also fixes the BGRA32 and RGB/RGB24 internal formats to use a
common internal representation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: make struct ipu_rgb format definitions const
Philipp Zabel [Thu, 10 Oct 2013 14:18:37 +0000 (16:18 +0200)]
staging: drm/imx: make struct ipu_rgb format definitions const

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: also allow to allocate only 2 DMFC slots for DP full plane
Philipp Zabel [Thu, 10 Oct 2013 14:18:36 +0000 (16:18 +0200)]
staging: drm/imx: also allow to allocate only 2 DMFC slots for DP full plane

Connecting a 320x240 parallel display on i.MX6 resulted in an invalid DRDY
signal because the DC would not receive NL/EOL events on every line.
Reducing the allocated DMFC space from 4 slots (256 * 128-bit) to 2 slots
(128 * 128-bit) solved the problem.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoimx-drm: imx-drm-core: Fix circular locking dependency
Fabio Estevam [Wed, 9 Oct 2013 23:46:45 +0000 (20:46 -0300)]
imx-drm: imx-drm-core: Fix circular locking dependency

Booting a mx6 with CONFIG_PROVE_LOCKING we get:

======================================================
[ INFO: possible circular locking dependency detected ]
3.12.0-rc4-next-20131009+ #34 Not tainted
-------------------------------------------------------
swapper/0/1 is trying to acquire lock:
 (&imx_drm_device->mutex){+.+.+.}, at: [<804575a8>] imx_drm_encoder_get_mux_id+0x28/0x98

but task is already holding lock:
 (&crtc->mutex){+.+...}, at: [<802fe778>] drm_modeset_lock_all+0x40/0x54

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 (&crtc->mutex){+.+...}:
       [<800777d0>] __lock_acquire+0x18d4/0x1c24
       [<80077fec>] lock_acquire+0x68/0x7c
       [<805ead5c>] _mutex_lock_nest_lock+0x58/0x3a8
       [<802fec50>] drm_crtc_init+0x48/0xa8
       [<80457c88>] imx_drm_add_crtc+0xd4/0x144
       [<8045e2e8>] ipu_drm_probe+0x114/0x1fc
       [<80312278>] platform_drv_probe+0x20/0x50
       [<80310c68>] driver_probe_device+0x110/0x22c
       [<80310e20>] __driver_attach+0x9c/0xa0
       [<8030f218>] bus_for_each_dev+0x5c/0x90
       [<80310750>] driver_attach+0x20/0x28
       [<8031034c>] bus_add_driver+0xdc/0x1dc
       [<803114d8>] driver_register+0x80/0xfc
       [<80312198>] __platform_driver_register+0x50/0x64
       [<808172fc>] ipu_drm_driver_init+0x18/0x20
       [<800088c0>] do_one_initcall+0xfc/0x160
       [<807e7c5c>] kernel_init_freeable+0x104/0x1d4
       [<805e2930>] kernel_init+0x10/0xec
       [<8000ea68>] ret_from_fork+0x14/0x2c

-> #1 (&dev->mode_config.mutex){+.+.+.}:
       [<800777d0>] __lock_acquire+0x18d4/0x1c24
       [<80077fec>] lock_acquire+0x68/0x7c
       [<805eb100>] mutex_lock_nested+0x54/0x3a4
       [<802fe758>] drm_modeset_lock_all+0x20/0x54
       [<802fead4>] drm_encoder_init+0x20/0x7c
       [<80457ae4>] imx_drm_add_encoder+0x88/0xec
       [<80459838>] imx_ldb_probe+0x344/0x4fc
       [<80312278>] platform_drv_probe+0x20/0x50
       [<80310c68>] driver_probe_device+0x110/0x22c
       [<80310e20>] __driver_attach+0x9c/0xa0
       [<8030f218>] bus_for_each_dev+0x5c/0x90
       [<80310750>] driver_attach+0x20/0x28
       [<8031034c>] bus_add_driver+0xdc/0x1dc
       [<803114d8>] driver_register+0x80/0xfc
       [<80312198>] __platform_driver_register+0x50/0x64
       [<8081722c>] imx_ldb_driver_init+0x18/0x20
       [<800088c0>] do_one_initcall+0xfc/0x160
       [<807e7c5c>] kernel_init_freeable+0x104/0x1d4
       [<805e2930>] kernel_init+0x10/0xec
       [<8000ea68>] ret_from_fork+0x14/0x2c

-> #0 (&imx_drm_device->mutex){+.+.+.}:
       [<805e510c>] print_circular_bug+0x74/0x2e0
       [<80077ad0>] __lock_acquire+0x1bd4/0x1c24
       [<80077fec>] lock_acquire+0x68/0x7c
       [<805eb100>] mutex_lock_nested+0x54/0x3a4
       [<804575a8>] imx_drm_encoder_get_mux_id+0x28/0x98
       [<80459a98>] imx_ldb_encoder_prepare+0x34/0x114
       [<802ef724>] drm_crtc_helper_set_mode+0x1f0/0x4c0
       [<802f0344>] drm_crtc_helper_set_config+0x828/0x99c
       [<802ff270>] drm_mode_set_config_internal+0x5c/0xdc
       [<802eebe0>] drm_fb_helper_set_par+0x50/0xb4
       [<802af580>] fbcon_init+0x490/0x500
       [<802dd104>] visual_init+0xa8/0xf8
       [<802df414>] do_bind_con_driver+0x140/0x37c
       [<802df764>] do_take_over_console+0x114/0x1c4
       [<802af65c>] do_fbcon_takeover+0x6c/0xd4
       [<802b2b30>] fbcon_event_notify+0x7c8/0x818
       [<80049954>] notifier_call_chain+0x4c/0x8c
       [<80049cd8>] __blocking_notifier_call_chain+0x50/0x68
       [<80049d10>] blocking_notifier_call_chain+0x20/0x28
       [<802a75f0>] fb_notifier_call_chain+0x1c/0x24
       [<802a9224>] register_framebuffer+0x188/0x268
       [<802ee994>] drm_fb_helper_initial_config+0x2bc/0x4b8
       [<802f118c>] drm_fbdev_cma_init+0x7c/0xec
       [<80817288>] imx_fb_helper_init+0x54/0x90
       [<800088c0>] do_one_initcall+0xfc/0x160
       [<807e7c5c>] kernel_init_freeable+0x104/0x1d4
       [<805e2930>] kernel_init+0x10/0xec
       [<8000ea68>] ret_from_fork+0x14/0x2c

other info that might help us debug this:

Chain exists of:
  &imx_drm_device->mutex --> &dev->mode_config.mutex --> &crtc->mutex

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&crtc->mutex);
                               lock(&dev->mode_config.mutex);
                               lock(&crtc->mutex);
  lock(&imx_drm_device->mutex);

 *** DEADLOCK ***

6 locks held by swapper/0/1:
 #0:  (registration_lock){+.+.+.}, at: [<802a90bc>] register_framebuffer+0x20/0x268
 #1:  (&fb_info->lock){+.+.+.}, at: [<802a7a90>] lock_fb_info+0x20/0x44
 #2:  (console_lock){+.+.+.}, at: [<802a9218>] register_framebuffer+0x17c/0x268
 #3:  ((fb_notifier_list).rwsem){.+.+.+}, at: [<80049cbc>] __blocking_notifier_call_chain+0x34/0x68
 #4:  (&dev->mode_config.mutex){+.+.+.}, at: [<802fe758>] drm_modeset_lock_all+0x20/0x54
 #5:  (&crtc->mutex){+.+...}, at: [<802fe778>] drm_modeset_lock_all+0x40/0x54

In order to avoid this lockdep warning, remove the locking from
imx_drm_encoder_get_mux_id() and imx_drm_crtc_panel_format_pins().

Tested on a mx6sabrelite and mx53qsb.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: make pControlURB available life time of driver.
Malcolm Priestley [Wed, 9 Oct 2013 19:18:54 +0000 (20:18 +0100)]
staging: vt6656: make pControlURB available life time of driver.

There is no need remove and add the control urb in device open/close.

Move to the probe and disconnect. This make the USB control in/out
functions always available to driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: mt29f_spinand: Use module_spi_driver
Sachin Kamat [Wed, 9 Oct 2013 11:41:37 +0000 (17:11 +0530)]
staging: mt29f_spinand: Use module_spi_driver

module_spi_driver removes the boilerplate code and simplifies it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Henry Pan <hspan@micron.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: xillybus: Use module_platform_driver
Sachin Kamat [Thu, 10 Oct 2013 04:00:04 +0000 (09:30 +0530)]
staging: xillybus: Use module_platform_driver

module_platform_driver simplifies the code by removing the boilerplate.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: gdm7240: fix memory leak on failure path
Alexey Khoroshilov [Tue, 8 Oct 2013 20:50:16 +0000 (00:50 +0400)]
staging: gdm7240: fix memory leak on failure path

init_usb() may fail after some of mux_rxes already allocated.
So we need to release them on the failure path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: gdm7240: alloc_mux_rx() does not need GFP_ATOMIC
Alexey Khoroshilov [Tue, 8 Oct 2013 20:50:15 +0000 (00:50 +0400)]
staging: gdm7240: alloc_mux_rx() does not need GFP_ATOMIC

As far as alloc_mux_rx() is called from probe() only
there is no need in GFP_ATOMIC here.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agozsmalloc: Fix "map_vm_area" undefined reference errors.
Majunath Goudar [Tue, 8 Oct 2013 10:32:15 +0000 (16:02 +0530)]
zsmalloc: Fix "map_vm_area" undefined reference errors.

This patch adds a MMU dependency to configure the ZSMALLOC in
drivers/staging/zsmalloc/Kconfig. Without this patch, build
system can lead to build failure. This was observed during
randconfig testing, in which ZSMALLOC was enabled w/o MMU being
enabled. Following was the error:

LD      vmlinux
drivers/built-in.o: In function `__zs_map_object':
drivers/staging/zsmalloc/zsmalloc-main.c:650: undefined reference to `map_vm_area'
make: *** [vmlinux] Error 1

Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: sm7xxfb: fix line over 80 characters in sm7xxfb.c
Ebru Akagunduz [Thu, 10 Oct 2013 11:54:12 +0000 (14:54 +0300)]
Staging: sm7xxfb: fix line over 80 characters in sm7xxfb.c

Fix checkpatch.pl issues with line over 80 characters
in sm7xxfb.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: octeon: fix line over 80 characters in ethernet-tx.c
Ebru Akagunduz [Thu, 10 Oct 2013 01:02:30 +0000 (04:02 +0300)]
Staging: octeon: fix line over 80 characters in ethernet-tx.c

Fix checkpatch.pl issues with line over 80
characters in ethernet-tx.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>
11 years agoStaging: octeon: fix quoted string split across lines in ethernet-tx.c
Ebru Akagunduz [Thu, 10 Oct 2013 01:02:29 +0000 (04:02 +0300)]
Staging: octeon: fix quoted string split across lines in ethernet-tx.c

Fix checkpatch.pl issues with quoted string split
across lines in ethernet-tx.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>
11 years agoStaging: octeon: quoted string split across lines in ethernet-spi.c
Ebru Akagunduz [Thu, 10 Oct 2013 00:31:40 +0000 (03:31 +0300)]
Staging: octeon: quoted string split across lines in ethernet-spi.c

Fix checkpatch.pl issues with quoted string split
across lines in ethernet-spi.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8187se: suspect code indent for conditional statements in r8185b_init.c
Ebru Akagunduz [Thu, 10 Oct 2013 00:08:00 +0000 (03:08 +0300)]
Staging: rtl8187se: suspect code indent for conditional statements in r8185b_init.c

Fix checkpatch.pl issues with suspect code indent for
conditional statements in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8187se: fix avoid unnecessary line continuations in r8185b_init.c
Ebru Akagunduz [Thu, 10 Oct 2013 00:07:59 +0000 (03:07 +0300)]
Staging: rtl8187se: fix avoid unnecessary line continuations in r8185b_init.c

Fix checkpatch.pl issues with avoid unnecessary line
continuations in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix sparse warnings regarding static functions
Valentina Manea [Wed, 9 Oct 2013 19:29:17 +0000 (22:29 +0300)]
staging: r8188eu: Fix sparse warnings regarding static functions

This fixes the following sparse warnings:
* drivers/staging/rtl8188eu/core/rtw_cmd.c:221:5: warning:
symbol 'rtw_cmd_filter' was not declared. Should it be static?
* drivers/staging/rtl8188eu/core/rtw_cmd.c:1670:6: warning:
symbol 'dynamic_chk_wk_hdl' was not declared. Should it be static?

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging:go7007:Fix warning on quoted string on multiple lines
Dulshani Gunawardhana [Wed, 9 Oct 2013 09:51:38 +0000 (15:21 +0530)]
staging:go7007:Fix warning on quoted string on multiple lines

Fix checkpatch.pl warning on quoted string on multiple lines in
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging:go7007:Fix line over 80 character warning
Dulshani Gunawardhana [Wed, 9 Oct 2013 09:51:20 +0000 (15:21 +0530)]
staging:go7007:Fix line over 80 character warning

Fix "line over 80 characters" warning generated by checkpatch.pl for
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>