platform/kernel/linux-rpi.git
8 years agostaging: comedi: mite: do mite_steup() as part of mite_attach()
H Hartley Sweeten [Mon, 2 May 2016 17:11:45 +0000 (10:11 -0700)]
staging: comedi: mite: do mite_steup() as part of mite_attach()

Currently all the drivers that use the mite driver have to call
mite_setup() after allocating and initializing the mite device
with mite_attach().

Move the mite_setup() call into mite_attach() to simplify the
drivers a bit and remove the need for the additional inline and
exported functions.

For aesthetics, move mite_setup2(), and rename it to mite_setup(),
so it's near mite_attach().

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>
8 years agostaging: comedi: mite: document mite_alloc()/mite_detach()
H Hartley Sweeten [Mon, 2 May 2016 17:11:44 +0000 (10:11 -0700)]
staging: comedi: mite: document mite_alloc()/mite_detach()

These functions are basically the comedi_driver (*attach)/(*detach)
for this driver.

For aesthetics, rename mite_alloc() to mite_attach() and pass the
comedi_device pointer to it instead of the pci_dev pointer.

Move the functions to the end of the file. This is typically where
a comedi_drivers (*attach)/(*detach) are located.

Add some docbook comments for these exported functions.

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>
8 years agostaging: comedi: mite: use prefered form for passing a struct size
H Hartley Sweeten [Mon, 2 May 2016 17:11:43 +0000 (10:11 -0700)]
staging: comedi: mite: use prefered form for passing a struct size

Add a local variable to mite_buf_change() so that the prefered
form of passing a struct size, sizeof(*p), can be used.

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>
8 years agostaging: comedi: mite: introduce mite_free_dma_descs()
H Hartley Sweeten [Mon, 2 May 2016 17:11:42 +0000 (10:11 -0700)]
staging: comedi: mite: introduce mite_free_dma_descs()

Introduce a helper function to handle the dma_free_coherent() of
the mite dma descriptors.

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>
8 years agostaging: comedi: mite: remove mite member 'channel_allocated'
H Hartley Sweeten [Mon, 2 May 2016 17:11:41 +0000 (10:11 -0700)]
staging: comedi: mite: remove mite member 'channel_allocated'

An allocated mite_channel will have its 'ring' member initialized
to point to the mite_ring that will be used for DMA. A non-allocated
mite_channel will have a 'ring' member set to NULL, either by a
channel release or due to the initial kzalloc of the 'mite' struct.

Refactor the code to use the mite_chan->ring to detect in a channel
is allocated and remove the unnecessary member.

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>
8 years agostaging: comedi: mite: rename mite member 'mite_io_addr'
H Hartley Sweeten [Mon, 2 May 2016 17:11:40 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite member 'mite_io_addr'

Rename this member of struct mite to 'mmio' to help shorten the long lines.

Add a local variable for the mite pointer in the ni_pcimio driver
to clarify and shorten the long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: tidy up mite_init_ring_descriptors()
H Hartley Sweeten [Mon, 2 May 2016 17:11:39 +0000 (10:11 -0700)]
staging: comedi: mite: tidy up mite_init_ring_descriptors()

Use a local variable for the mite_dma_desc pointer to help clarify
this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: rename mite_ring member 'descriptors'
H Hartley Sweeten [Mon, 2 May 2016 17:11:38 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite_ring member 'descriptors'

Rename this member of struct mite_ring to 'descs' to help shorten the
long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'
H Hartley Sweeten [Mon, 2 May 2016 17:11:37 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'

Rename this member of struct mite_ring to 'dma_addr' to help shorten the
long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: rename 'struct mite_dma_descriptor_ring'
H Hartley Sweeten [Mon, 2 May 2016 17:11:36 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'

Rename this name to 'mite_ring' to help shorten the long lines.

In the ni_660x driver, also shorten the private data member 'mite_rings'
to simply 'ring'.

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>
8 years agostaging: comedi: mite: rename 'struct mite_dma_descriptor'
H Hartley Sweeten [Mon, 2 May 2016 17:11:35 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_dma_descriptor'

Rename this struct to 'mite_dma_desc' to help shorten the long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: rename 'struct mite_struct'
H Hartley Sweeten [Mon, 2 May 2016 17:11:34 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_struct'

Rename this struct to simply 'mite'. The current name is a bit redundant.

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>
8 years agostaging: skein: cleanup: align code to parentheses
Manu Kumar [Sun, 1 May 2016 23:38:35 +0000 (16:38 -0700)]
staging: skein: cleanup: align code to parentheses

Align wrapped lines to parentheses (if applicable).

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: cleanup: removed unnecessary cast spaces
Manu Kumar [Sun, 1 May 2016 23:38:34 +0000 (16:38 -0700)]
staging: skein: cleanup: removed unnecessary cast spaces

Spaces after casts are removed

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: cleanup: Fixed operator whitespace
Manu Kumar [Sun, 1 May 2016 23:38:33 +0000 (16:38 -0700)]
staging: skein: cleanup: Fixed operator whitespace

added operator white space and parentheses for readability

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: cleanup: fixed new lines
Manu Kumar [Sun, 1 May 2016 23:38:32 +0000 (16:38 -0700)]
staging: skein: cleanup: fixed new lines

Added lines between functions in skein_block.c and removed unneeded
lines in skein_block.c

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_get_mac_address
Chaehyun Lim [Mon, 2 May 2016 10:47:55 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_mac_address

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_get_mac_address
Chaehyun Lim [Mon, 2 May 2016 10:47:54 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_mac_address

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_get_mac_address's return type to void
Chaehyun Lim [Mon, 2 May 2016 10:47:53 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_mac_address's return type to void

When handle_get_mac_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix comparison style of if statement in handle_get_ip_address
Chaehyun Lim [Mon, 2 May 2016 10:47:52 +0000 (19:47 +0900)]
staging: wilc1000: fix comparison style of if statement in handle_get_ip_address

This patch changes conditional comparison of if statement as if (ret)
instead of using if (ret != 0)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_get_ip_address
Chaehyun Lim [Mon, 2 May 2016 10:47:51 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_ip_address

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_get_ip_address
Chaehyun Lim [Mon, 2 May 2016 10:47:50 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_ip_address

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_get_ip_address's return type to void
Chaehyun Lim [Mon, 2 May 2016 10:47:49 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_ip_address's return type to void

When handle_get_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)
Jacky Boen [Sun, 1 May 2016 15:50:39 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)

Fix coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed extraneous spaces
Jacky Boen [Sun, 1 May 2016 15:50:37 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous spaces

Fix coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed extraneous parentheses
Jacky Boen [Sun, 1 May 2016 15:50:36 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous parentheses

Fix coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed extraneous indentation
Jacky Boen [Sun, 1 May 2016 15:50:35 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous indentation

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed unnecessary else branch
Jacky Boen [Sun, 1 May 2016 15:50:34 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed unnecessary else branch

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed brace style
Jacky Boen [Sun, 1 May 2016 15:50:33 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed brace style

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed newlines style
Jacky Boen [Sun, 1 May 2016 15:50:32 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed newlines style

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed block comments style
Jacky Boen [Sun, 1 May 2016 15:50:31 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed block comments style

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: fixed typo
Jacky Boen [Sun, 1 May 2016 15:50:30 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed typo

Fixed typo

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: drivers: rtl8188eu: move constants to the right in comparisons
Jacky Boen [Sun, 1 May 2016 15:50:29 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: move constants to the right in comparisons

Fixed coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: act2000: remove extra space
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:05 +0000 (22:33 +0100)]
staging: i4l: act2000: remove extra space

It is not kernel coding style to give an extra space after a cast.
We get warned about it by checkpatch.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: act2000: remove blank line after brace
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:04 +0000 (22:33 +0100)]
staging: i4l: act2000: remove blank line after brace

checkpatch complains about an extra blank line after an opening brace.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: act2000: do not assign in if
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:03 +0000 (22:33 +0100)]
staging: i4l: act2000: do not assign in if

It is not the kernel coding style to assign values to some variable in
if statement. Split them up into different statements.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: act2000: fix use of return
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:02 +0000 (22:33 +0100)]
staging: i4l: act2000: fix use of return

checkpatch warns that return is not a function and as such the brace
after it is not required.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agortl8712: Fixed alignment to match open parenthesis
Parth Sane [Mon, 25 Apr 2016 15:43:18 +0000 (21:13 +0530)]
rtl8712: Fixed alignment to match open parenthesis

Fixed alignment to match open parenthesis.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMAINTAINERS: fsl-mc: Add second maintainer
Stuart Yoder [Mon, 11 Apr 2016 16:50:48 +0000 (11:50 -0500)]
MAINTAINERS: fsl-mc: Add second maintainer

Add Stuart Yoder as additional maintainer of fsl-mc bus driver.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: bus: Drop warning
Matthias Brugger [Thu, 14 Apr 2016 21:24:26 +0000 (23:24 +0200)]
staging: fsl-mc: bus: Drop warning

When updating the irq_chip and msi_domain_ops, the code checkes for
already present functions.
When more then one ITS controller are present in the system,
irq_chip and msi_domain_ops got already set and a warning is invoked.

This patch deletes the warning, as the funtions are just already set to
the needed callbacks.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures
Horia Geantă [Mon, 11 Apr 2016 16:56:16 +0000 (11:56 -0500)]
staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

There are some error paths that allow for a NULL new_mc_io and err = 0
return code. Return -EINVAL instead.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: add dpmcp version check
Itai Katz [Mon, 11 Apr 2016 16:56:11 +0000 (11:56 -0500)]
staging: fsl-mc: add dpmcp version check

The dpmcp driver supports dpmcp version 3.0 and above.
This patch adds the code to check the version.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h    |    6 +++---
 drivers/staging/fsl-mc/bus/mc-allocator.c |   11 +++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: add quirk handling for dpseci objects < 4.0
Horia Geanta [Mon, 11 Apr 2016 16:50:26 +0000 (11:50 -0500)]
staging: fsl-mc: add quirk handling for dpseci objects < 4.0

dpseci objects < 4.0 are not coherent-- in spite of the fact
that the MC reports them to be coherent in certain versions.
Add a special case to set the no shareability flag for dpseci
objects < 4.0.

Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
(Stuart: reworded commit message, updated comment in patch)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: add dprc version check
Itai Katz [Mon, 11 Apr 2016 16:56:05 +0000 (11:56 -0500)]
staging: fsl-mc: add dprc version check

The dprc driver supports dprc version 5.0 and above.
This patch adds the code to check the version.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: resolved merge conflicts, split dpseci quirk into separate patch)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: get version of root dprc from MC hardware
Itai Katz [Mon, 11 Apr 2016 16:55:55 +0000 (11:55 -0500)]
staging: fsl-mc: get version of root dprc from MC hardware

The root dprc is discovered as a platform device in the device tree.  The
version of that dprc was previously set using hardcoded values from the API
header in the kernel).  This patch removes the use of the hardcoded version
numbers and instead reads the actual dprc version from the hardware.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: resolved merge conflict, updated commit subject/log)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: set cacheable flag for added devices if applicable
Itai Katz [Mon, 11 Apr 2016 16:55:48 +0000 (11:55 -0500)]
staging: fsl-mc: set cacheable flag for added devices if applicable

Some DPAA2 devices have mmio regions that should be mapped as
cacheable by drivers.  Set IORESOURCE_CACHEABLE in the region's
flags if applicable.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
[Stuart: update subject and commit message]
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: set up coherent dma ops for added devices
Stuart Yoder [Mon, 11 Apr 2016 16:49:13 +0000 (11:49 -0500)]
staging: fsl-mc: set up coherent dma ops for added devices

Unless discovered devices have the no shareability flag set,
set up coherent dma ops for them.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: don't use object versions to make binding decisions
Itai Katz [Mon, 11 Apr 2016 16:55:40 +0000 (11:55 -0500)]
staging: fsl-mc: don't use object versions to make binding decisions

Up until now if the object version expected by a driver (in the API header
file) did not match the actual object version in the MC hardware the bus
driver refused to bind the object to the driver or printed out WARN_ON
dumps.

This patch removes those checks, and the responsibility of object version
checking should now be done in the object drivers themselves.  If the actual
version discovered is not supported, the driver's probe function should fail.
Drivers should use version checks to support new features and provide
backwards compatibility if at all possible.

This patch also removes the checks that caused bus driver probing to fail
if the overall MC version discovered did not match the firmware version
from the API header...this was too strict.  The overall MC version is
informational like a release number, and continues to be printed in the
boot log.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: reworded commit log)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update dprc binary interface to v5.1
Stuart Yoder [Mon, 11 Apr 2016 16:48:59 +0000 (11:48 -0500)]
staging: fsl-mc: update dprc binary interface to v5.1

The meaning of the "status" parameter in dprc_get_irq_status
has changed, and this patch updates the flib and caller
of the API.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update dpbp binary interface to v2.2
Stuart Yoder [Mon, 11 Apr 2016 16:48:54 +0000 (11:48 -0500)]
staging: fsl-mc: update dpbp binary interface to v2.2

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: update dpmcp binary interface to v3.0
Stuart Yoder [Mon, 11 Apr 2016 16:48:48 +0000 (11:48 -0500)]
staging: fsl-mc: update dpmcp binary interface to v3.0

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: DPAA2 overview readme update
Stuart Yoder [Mon, 11 Apr 2016 16:48:42 +0000 (11:48 -0500)]
staging: fsl-mc: DPAA2 overview readme update

incorporated feedback from review comments, other misc cleanup/tweaks

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: TODO updates
Stuart Yoder [Mon, 11 Apr 2016 16:48:37 +0000 (11:48 -0500)]
staging: fsl-mc: TODO updates

remove 3 of the remaining TODO items:

   -multiple root fsl-mc buses-- done in patch series starting with
    commit 14f928054a05 ("staging: fsl-mc: abstract test for existence
    of fsl-mc bus")

   -interrupt support-- done in patch series starting with
    commit 9b1b282ccd81 ("irqdomain: Added domain bus token
    DOMAIN_BUS_FSL_MC_MSI")

   -MC command serialization-- done in commit 63f2be5c3b358 ("staging:
    fsl-mc: Added serialization to mc_send_command()")

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: board: line over 80 characters
Nikita Eshkeev [Mon, 25 Apr 2016 23:15:09 +0000 (02:15 +0300)]
staging: board: line over 80 characters

This patch fixes the checkpatch.pl warning:

WARNING: line over 80 characters
+   .domain         = "/system-controller@e6180000/pm-domains/c5/a4lc@1"

Signed-off-by: Nikita Eshkeev <kastolom@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: Add space to align functions
han tai [Wed, 20 Apr 2016 07:23:03 +0000 (07:23 +0000)]
staging: vt6656: Add space to align functions

Issue found by checkpatch.pl
CHECK: Alignment should match open parenthesis

Signed-off-by: han tai <hantai1248@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: fix missing blank line
Clifton Barnes [Tue, 5 Apr 2016 21:37:38 +0000 (17:37 -0400)]
staging: slicoss: fix missing blank line

fix checkpatch.pl warning about 'Missing a blank line after
declarations'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: fix bare use of 'unsigned'
Clifton Barnes [Tue, 5 Apr 2016 21:37:37 +0000 (17:37 -0400)]
staging: slicoss: fix bare use of 'unsigned'

fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: alignment to match open paranthesis
Manav Batra [Thu, 7 Apr 2016 03:22:52 +0000 (20:22 -0700)]
staging: rts5208: alignment to match open paranthesis

Fixes CHECK: Alignment should match open parenthesis

Signed-off-by: Manav Batra <batmanav10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: ensure braces on all arms of if stmt
Nicholas Sim [Tue, 5 Apr 2016 16:47:35 +0000 (17:47 +0100)]
staging: rts5208: ensure braces on all arms of if stmt

Added braces on if arm of if statement where else arm already needs
braces as suggested for clarity in Documentation/CodingStyle (several)

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lowmemorykiller: remove bogus NULL check
Dan Carpenter [Fri, 8 Apr 2016 13:02:35 +0000 (16:02 +0300)]
staging: lowmemorykiller: remove bogus NULL check

The NULL checking here doesn't make sense, so it causes a static checker
warning.  It turns out that p->mm can't be NULL so the inconsistency is
harmless and we should just remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: get rid of mutex_locked variables
Cihangir Akturk [Sat, 9 Apr 2016 18:45:18 +0000 (21:45 +0300)]
staging: fsl-mc: get rid of mutex_locked variables

Remove mutex_locked variables which are used to determine whether mutex is
locked, instead add another label to unlock mutex on premature exits due to
an error.

This patch also addresses the folowing warnings reported by coccinelle:

drivers/staging/fsl-mc/bus/mc-allocator.c:237:1-7: preceding lock on line 204
drivers/staging/fsl-mc/bus/mc-allocator.c:89:1-7: preceding lock on line 57
drivers/staging/fsl-mc/bus/mc-allocator.c:157:1-7: preceding lock on line 124

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: Fix crash due to pointers being "confusing"
Ben Hutchings [Wed, 20 Apr 2016 23:19:25 +0000 (00:19 +0100)]
staging: rtl8192u: Fix crash due to pointers being "confusing"

There's no net_device stashed in skb->cb, there's a net_device * there.

To make it *really* clear, also change the write of the dev pointer
into skb->cb from a memcpy() to an assignment.

Fixes: 3fe563249374 ("staging: rtl8192u: r8192U_core.c: Cleaning up ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: rewrite NULL comparison for pointers
Nicholas Sim [Tue, 5 Apr 2016 16:21:32 +0000 (17:21 +0100)]
staging: rtl8192u: rewrite NULL comparison for pointers

When testing pointers, it is not necessary to explicitly compare to
NULL. Rewrite if condition as (!ptr) or (ptr) as suggested in
Documentation/CodingStyle

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: add blank line after declarations
Nicholas Sim [Tue, 5 Apr 2016 16:13:34 +0000 (17:13 +0100)]
staging: rtl8192u: add blank line after declarations

Add a blank line after function/struct/union/enum declarations for
readability, as suggested in Documentation/CodingStyle

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: remove blank lines after braces (opening)
Nicholas Sim [Tue, 5 Apr 2016 16:07:47 +0000 (17:07 +0100)]
staging: rtl8192u: remove blank lines after braces (opening)

Remove unneeded blank lines appearing after opening braces as suggested
by checkpatch.pl

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: remove blank lines before braces (closing)
Nicholas Sim [Tue, 5 Apr 2016 15:59:58 +0000 (16:59 +0100)]
staging: rtl8192u: remove blank lines before braces (closing)

Remove unneeded blank lines occuring before closing braces

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: use container_of() instead of LIST_CONTAINOR()
Geliang Tang [Tue, 5 Apr 2016 01:58:04 +0000 (09:58 +0800)]
staging: rtl8712: use container_of() instead of LIST_CONTAINOR()

This patch drops the local definition of LIST_CONTAINOR(), and uses
container_of() instead of it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: cleanup: align parentheses
Manu Kumar [Tue, 5 Apr 2016 03:09:12 +0000 (20:09 -0700)]
staging: skein: cleanup: align parentheses

Aligned parentheses to conform to the coding style.

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: skein: cleanup: add operator white space
Manu Kumar [Mon, 4 Apr 2016 23:53:01 +0000 (16:53 -0700)]
staging: skein: cleanup: add operator white space

Added white space between operators and operands. Because this sometimes
maxed out the column width, some expressions were broken up into multiple
lines, and comments were moved appropriately.

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: use tty_alloc_driver instead of kcalloc
Daeseok Youn [Thu, 14 Apr 2016 03:30:13 +0000 (12:30 +0900)]
staging: dgnc: use tty_alloc_driver instead of kcalloc

The tty_alloc_driver() can allocate memory for ttys and termios.
And also allocated memory will be released easily with
put_tty_driver() call.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant NULL check in
Daeseok Youn [Tue, 5 Apr 2016 09:30:02 +0000 (18:30 +0900)]
staging: dgnc: remove redundant NULL check in

There were already checking NULL about channel_t / un_t
before calling dgnc_maxcps_room().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: return -ENOMEM when kzalloc failed
Daeseok Youn [Tue, 5 Apr 2016 09:29:43 +0000 (18:29 +0900)]
staging: dgnc: return -ENOMEM when kzalloc failed

The kzalloc can be failed when memory is not enough
to allocate. When kzalloc failed, it need to return
error code with ENOMEM

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove blank line
Daeseok Youn [Mon, 4 Apr 2016 09:52:30 +0000 (18:52 +0900)]
staging: dgnc: remove blank line

fix checkpatch.pl warning:
Blank lines aren't necessary after an open brace '{'

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove parenthesis around the CONST |
Daeseok Youn [Mon, 4 Apr 2016 09:52:03 +0000 (18:52 +0900)]
staging: dgnc: remove parenthesis around the CONST |

remove parenthesis around the CONST | CONST.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers/staging/dgnc: Added spaces around a bitwise OR.
Juanma de Hoyos [Sun, 3 Apr 2016 20:01:36 +0000 (22:01 +0200)]
drivers/staging/dgnc: Added spaces around a bitwise OR.

Coding rules request placing bitwise OR operators between empty spaces
for better readibility. This patch applies this format to a line in
dgnc_tty.c file.

Signed-off-by: Juanma de Hoyos <juanmahv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: memory allocated inside mkimage() is not freed if subsequent calls...
Claudiu Beznea [Sun, 24 Apr 2016 16:40:13 +0000 (19:40 +0300)]
Staging: wlan-ng: memory allocated inside mkimage() is not freed if subsequent calls fails.

This patch frees memory allocated inside mkimage() in case mkimage()
or any other subsequent calls inside prism2_fwapply() from prism2fw.c
file fails. To fix this I introduces goto labels where the free
operation is done in case some operations fails. After the introduction
of goto labels has been done, in order to use the same return path,
"return x" instuctions were replaced with "goto" instuctions.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: rewrite NULL comparison
Nicholas Sim [Tue, 5 Apr 2016 16:37:12 +0000 (17:37 +0100)]
staging: wlan-ng: rewrite NULL comparison

It is not necessary to compare explicitly to NULL. Rewrite if condition
as (!dev) or (dev) as suggested in Documentation/CodingStyle

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: ion: dummy: fix dereference of ERR_PTR
Sudip Mukherjee [Thu, 7 Apr 2016 16:32:25 +0000 (22:02 +0530)]
staging: android: ion: dummy: fix dereference of ERR_PTR

ion_device_create() can fail and if it fails then it returns the error
value in ERR_PTR.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: android: modify memory allocation style in ion_chunk_heap.c
Ben Marsh [Thu, 7 Apr 2016 19:26:34 +0000 (21:26 +0200)]
Staging: android: modify memory allocation style in ion_chunk_heap.c

Modify memory allocation style in order to silence a checkpatch.pl
warning.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: android: modify memory allocation style in ion_test.c
Ben Marsh [Sun, 24 Apr 2016 18:16:02 +0000 (20:16 +0200)]
Staging: android: modify memory allocation style in ion_test.c

Modifies the memory allocation style ion_test.c in order to remove a
checkpatch.pl warning

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: ion: make locally used functions static
Markus Böhme [Wed, 6 Apr 2016 21:53:39 +0000 (23:53 +0200)]
staging: android: ion: make locally used functions static

Functions ion_handle_put and ion_handle_get_by_id are only used locally
in ion.c, so they should be made static as they used to be before
9590232b ("staging/android/ion : fix a race condition in the ion driver").

Signed-off-by: Markus Böhme <markus.boehme@mailbox.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoDocumentation: add Sync File doc
Gustavo Padovan [Thu, 28 Apr 2016 13:47:00 +0000 (10:47 -0300)]
Documentation: add Sync File doc

Add sync_file documentation on dma-buf-sync_file.txt
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoDocumentation: include sync_file into DocBook
Gustavo Padovan [Thu, 28 Apr 2016 13:46:59 +0000 (10:46 -0300)]
Documentation: include sync_file into DocBook

Add entry in device-drivers.tmpl for sync_file documentation.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodma-buf/sync_file: de-stage sync_file
Gustavo Padovan [Thu, 28 Apr 2016 13:46:58 +0000 (10:46 -0300)]
dma-buf/sync_file: de-stage sync_file

sync_file is useful to connect one or more fences to the file. The file is
used by userspace to track fences between drivers that share DMA bufs.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodma-buf/sync_file: de-stage sync_file headers
Gustavo Padovan [Thu, 28 Apr 2016 13:46:57 +0000 (10:46 -0300)]
dma-buf/sync_file: de-stage sync_file headers

Move sync_file headers file to include/ dir.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: style fix: alignment to match the open parenthesis
Gustavo Padovan [Thu, 28 Apr 2016 13:46:56 +0000 (10:46 -0300)]
staging/android: style fix: alignment to match the open parenthesis

Fix checks reported by checkpatch.pl.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: improve documentation for sync_file
Gustavo Padovan [Thu, 28 Apr 2016 13:46:55 +0000 (10:46 -0300)]
staging/android: improve documentation for sync_file

num_fences was missing a colon mark and sync_file_create() now have
better description.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: prepare sync_file for de-staging
Gustavo Padovan [Thu, 28 Apr 2016 13:46:54 +0000 (10:46 -0300)]
staging/android: prepare sync_file for de-staging

Move its functions and structs to their own file. Also moves function's
docs to the .c file.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove name arg from sync_file_create()
Gustavo Padovan [Thu, 28 Apr 2016 13:46:53 +0000 (10:46 -0300)]
staging/android: remove name arg from sync_file_create()

Simplifies the API to only receive the fence it needs to add to the
sync and create a name for the sync_file based on the fence context and
seqno.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: make sync_file_fdget() static
Gustavo Padovan [Thu, 28 Apr 2016 13:46:52 +0000 (10:46 -0300)]
staging/android: make sync_file_fdget() static

There is no plan in the near future to use this function outside of this
file so keep it as static.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: make sync_file_merge() static
Gustavo Padovan [Thu, 28 Apr 2016 13:46:51 +0000 (10:46 -0300)]
staging/android: make sync_file_merge() static

There is no plan in the near future to use this function outside of this
file so keep it as static.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: move sync_file functions comments to sync.c
Gustavo Padovan [Thu, 28 Apr 2016 13:46:50 +0000 (10:46 -0300)]
staging/android: move sync_file functions comments to sync.c

To keep comments in line with drivers/dma-buf/ move all sync_file comments
to sync.c.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: drop sync_file_install() and sync_file_put()
Gustavo Padovan [Thu, 28 Apr 2016 13:46:49 +0000 (10:46 -0300)]
staging/android: drop sync_file_install() and sync_file_put()

These two functions are just wrappers for one line functions, they
call fd_install() and fput() respectively, so just get rid of them
and use fd_install() and fput() directly for more simplicity.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove redundant comments on sync_merge_data
Gustavo Padovan [Thu, 28 Apr 2016 13:46:48 +0000 (10:46 -0300)]
staging/android: remove redundant comments on sync_merge_data

struct sync_merge_data already have documentation on top of the
struct definition. No need to duplicate it.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: refactor SYNC IOCTLs
Gustavo Padovan [Tue, 26 Apr 2016 15:32:28 +0000 (12:32 -0300)]
staging/android: refactor SYNC IOCTLs

Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid
future API breaks and optimize buffer allocation.

Now num_fences can be filled by the caller to inform how many fences it
wants to retrieve from the kernel. If the num_fences passed is greater
than zero info->sync_fence_info should point to a buffer with enough space
to fit all fences.

However if num_fences passed to the kernel is 0, the kernel will reply
with number of fences of the sync_file.

Sending first an ioctl with num_fences = 0 can optimize buffer allocation,
in a first call with num_fences = 0 userspace will receive the actual
number of fences in the num_fences filed.

Then it can allocate a buffer with the correct size on sync_fence_info and
call SYNC_IOC_FILE_INFO again, but now with the actual value of num_fences
in the sync_file.

info->sync_fence_info was converted to __u64 pointer to prevent 32bit
compatibility issues. And a flags member was added.

An example userspace code for the later would be:

struct sync_file_info *info;
int err, size, num_fences;

info = malloc(sizeof(*info));

info.flags = 0;
err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
num_fences = info->num_fences;

if (num_fences) {
info.flags = 0;
size = sizeof(struct sync_fence_info) * num_fences;
info->num_fences = num_fences;
info->sync_fence_info = (uint64_t) calloc(num_fences,
  sizeof(struct sync_fence_info));

err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
}

Finally the IOCTLs numbers were changed to avoid any potential old
userspace running the old API to get weird errors. Changing the opcodes
will make them fail right away. This is just a precaution, there no
upstream users of these interfaces yet and the only user is Android, but
we don't expect anyone trying to run android userspace and all it
dependencies on top of upstream kernels.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Greg Hackmann <ghackmann@google.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agokernel.h: add u64_to_user_ptr()
Gustavo Padovan [Tue, 26 Apr 2016 15:32:27 +0000 (12:32 -0300)]
kernel.h: add u64_to_user_ptr()

This function had copies in 3 different files. Unify them in kernel.h.

Cc: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@intel.com> [drm/i915/]
Acked-by: Rob Clark <robdclark@gmail.com> [drm/msm/]
Acked-by: Lucas Stach <l.stach@pengutronix.de> [drm/etinav/]
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: Fix grammar error in Kconfig file
Leo Sperling [Thu, 14 Apr 2016 11:25:26 +0000 (13:25 +0200)]
staging: android: Fix grammar error in Kconfig file

Remove the "s" from kills so that the help message is easier to understand

Signed-off-by: Leo Sperling <leosperling97@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMAINTAINERS: Add Android Ion as a separate entry
Laura Abbott [Mon, 11 Apr 2016 17:51:11 +0000 (10:51 -0700)]
MAINTAINERS: Add Android Ion as a separate entry

The android drivers have a few other people reviewing patches.
Add a separate entry to ensure patches go to the right people.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: Add warning about this driver being deprecated
Jes Sorensen [Fri, 15 Apr 2016 19:01:46 +0000 (15:01 -0400)]
staging: rtl8723au: Add warning about this driver being deprecated

This driver is deprecated and superseded by rtl8xxxu. It will be
removed in a future kernel release.

Add a warning to Kconfig and at device init time to notify users and
allow them time to switch over.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: don't expose CHSR_* bit defines
H Hartley Sweeten [Thu, 21 Apr 2016 19:04:46 +0000 (12:04 -0700)]
staging: comedi: mite: don't expose CHSR_* bit defines

These bit defines are only used in the mite driver. Move them so they
are not needlessly exposed.

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>