Commit Graph

664289 Commits

Author SHA1 Message Date
Ivan Safonov 2288387936 staging:r8188eu: remove sw_decrypt member of security_priv struct
sw_decrypt always is 0, so replace it with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:11:54 +02:00
Ivan Safonov 8c986111a6 staging:r8188eu: remove software_decrypt member of registry_priv struct
Value of this variable has no changes, and used once.
Replace software_decrypt with its value.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:11:53 +02:00
Ivan Safonov 0e7018b4b0 staging:r8188eu: replace rtw_software_decrypt with its value
rtw_software_decrypt used only once and does not changed.
Replace it with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:11:53 +02:00
Haim Daniel 361b3f54ba staging: vc04_services: add parenthesis to macros
vchi_cfg.h: fix checkpatch ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Haim Daniel <haimdaniel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Andrea della Porta e45c237912 staging: comedi: drivers: s626.c - fixed checkpatch issue about data type
staging: comedi: drivers: s626.c - fixed the following checkpatch issue:
CHECK: Prefer kernel type 's16' over 'int16_t'
#1939: FILE: drivers/staging/comedi/drivers/s626.c:1939:
+               int16_t dacdata = (int16_t)data[i];

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Andrea della Porta 1bb90b68ab staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name
staging: rts5208: ms.c Fixed checkpatch warning:
WARNING: Prefer using "%s", __func__ to embedded function names
#2597: FILE: rts5208/ms.c:2597:
+       dev_dbg(rtsx_dev(chip), "ms_build_l2p_tbl: %d\n", seg_no);

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Ioana Radulescu 141a10aead staging: fsl-mc/dpio: Fix early writing of valid bit
Commands written to the QMan software portals have a valid
bit in the "verb" field of the command that, when set with
the right value, notifies the hardware that the command is
fully written and ready to be processed.

The "verb" field should be the last one to be written in the
swp command registers, after all other fields are filled in.
The current implementation doesn't follow this rule for all
commands, which may result in an incompletely configured
command being processed by the hardware. Enforce the correct
order of writes to avoid this situation.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Prasant Jalan ad3dbb9a10 staging: rtl8712: fixed multiple line derefence issue
Checkpatch emits WARNING: Avoid multiple line dereference.

Checkpatch warning is fixed by:
* Trivial indentation improvement and
* Using += instead of + helps shortening the statement.

Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Tejaswini Poluri b76cc94a10 staging: rtl8712: code style fix
Fixed the warnings from checkpatch.pl on file rtl8712/mlme_linux.c
Avoided multiple line dereferences in the code

Signed-off-by: Tejaswini Poluri <tejaswinipoluri3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Alex Wilson 919a9bb607 staging: fbtft: fix type assignment warning
Sparse spits out a warning that a __be16 was being assigned to a u16.
Change the type of txbuf16 to __be16 b/c it's a restricted type and
prevents mixing endianness.

Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Andrea della Porta ca86987cd4 staging: xgifb: added blankline after decl.
Fixed checkpatch warning:
WARNING: Missing a blank line after declarations
#882: FILE: drivers/staging/xgifb/XGI_main_26.c:882:
+                               const u8 *f =
XGI_TV_filter[filter_tb].filter[filter];
+                               pr_debug("FilterTable[%d]-%d: %*ph\n",

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Prasant Jalan 271dbae3c6 staging: sm750fb: removed line continuations in quoted strings
checkpatch gives WARNING: Avoid line continuations in quoted strings.

Trivial fix by removing line continuations and adding another quote at
the start of next line.

Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:00:52 +02:00
Prasant Jalan 4895398d03 staging: sm750fb: fixing function return with lock held
lynxfb_suspend() & lynxfb_resume() return on errors while holding
console_lock.

Adding 'goto' such that proper cleanups can be done before returning
from function and therefore console_lock can be released before
returning.

Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:00:51 +02:00
Andrea della Porta d6171ba858 staging: sm750fb: ddk750_display.c - fixed checkpatch warning: line over 80 chars
staging: sm750fb: ddk750_display.c - fixed the following checkpatch warning:
WARNING: line over 80 characters
#149: FILE: drivers/staging/sm750fb/ddk750_display.c:149:
+               swPanelPowerSequence((output & PNL_SEQ_MASK) >> PNL_SEQ_OFFSET, 4);

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:00:51 +02:00
Aishwarya Pant 951142c293 staging: bcm2835-audio: remove unnecessary log messages
Remove unnecessary log messages in the driver which are just tracking
function entry and exits.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 16:58:42 +02:00
Colin Ian King 34bc8f9392 staging: bcm2835-camera: fix spelling mistake: "elementry" -> "elementary"
trivial fix to spelling mistake in various comments and pr_debug messages

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 16:58:18 +02:00
Maciek Borzecki 76b4580bf4 staging wlan-ng: fix type mismatch warnings in mkpdrlist()
struct  hfa384x_pdrec len and code fields as clearly little endian,
mark both fields as such. pda->buf is also clearly little endian.

Fixes sparse warnings:

  drivers/staging/wlan-ng/prism2fw.c:613:16: warning: cast to restricted __le16
  drivers/staging/wlan-ng/prism2fw.c:616:21: warning: cast to restricted __le16
  drivers/staging/wlan-ng/prism2fw.c:625:21: warning: cast to restricted __le16

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 16:54:17 +02:00
Srinivas Pandruvada c94f5806cd iio: hid-sensor: Fix unbalanced pm_runtime_enable error
When a hid sensor module is removed and modprobed again we see
error for unbalanced pm_runtime. This issue is caused by not
deactivating runtime PM on removal. So on modprobe again when
activated again, this will print this error.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-04-08 15:36:47 +01:00
Srinivas Pandruvada 5d9854eaea iio: hid-sensor: Store restore poll and hysteresis on S3
This change undo the change done by 'commit 3bec247474
("iio: hid-sensor-trigger: Change get poll value function order to avoid
sensor properties losing after resume from S3")' as this breaks some
USB/i2c sensor hubs.

Instead of relying on HW for restoring poll and hysteresis, driver stores
and restores on resume (S3). In this way user space modified settings are
not lost for any kind of sensor hub behavior.

In this change, whenever user space modifies sampling frequency or
hysteresis driver will get the feature value from the hub and store in the
per device hid_sensor_common data structure. On resume callback from S3,
system will set the feature to sensor hub, if user space ever modified the
feature value.

Fixes: 3bec247474 ("iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3")
Reported-by: Ritesh Raj Sarraf <rrs@researchut.com>
Tested-by: Ritesh Raj Sarraf <rrs@researchut.com>
Tested-by: Song, Hongyan <hongyan.song@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-04-08 15:13:36 +01:00
Ian Abbott 2bbd5023ee staging: comedi: amplc_pci224: convert CLK_CONFIG() macro to function
Convert the `CLK_CLKFIG(chan, src)` macro to a static function
`pci224_clk_config(chan, src)`.  This is consistent with an earlier
change to convert `GAT_CONFIG(chan, src)` to a static function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:03:17 +02:00
Ian Abbott a19aa38022 staging: comedi: amplc_pci224: remove 'inline' from pci224_gat_config()
Let the compiler figure out whether `pci224_gat_confip()` should be
inlined by itself.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:03:17 +02:00
Ian Abbott c5665dfb90 staging: comedi: amplc_pci230: convert CLK_CONFIG() macro to function
Convert the `CLK_CONFIG(chan, src)` macro to a static function
`pci230_clk_config(chan, src)`.  This is consistent with an earlier
change to convert `GAT_CONFIG(chan, src)` to a static function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:03:17 +02:00
Ian Abbott 112d55e585 staging: comedi: amplc_pci230: remove 'inline' from pci230_gat_config()
Let the compiler figure out whether `pci230_gat_config()` should be
inlined by itself.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:03:17 +02:00
Colin Ian King ba508685d9 staging: wilc1000: fix incorrect strncasecmp length
The strncasecmp of buff against the literal string RSSI
is using variable length which is zero. This should be instead
using the variable size instead.  Also remove the redundant
variable length.

Detected by PVS-Studio, warning: V575

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:00:44 +02:00
Aditya Shankar 0e490657c7 staging: wilc1000: Fix problem with wrong vif index
The vif->idx value is always 0 for two interfaces.

wl->vif_num = 0;

loop {
     ...

     vif->idx = wl->vif_num;
     ...
     wl->vif_num = i;
      ....
     i++;
     ...
}

At present, vif->idx is assigned the value of wl->vif_num
at the beginning of this block and device is initialized
based on this index value.
In the next iteration, wl->vif_num is still 0 as it is only updated
later but gets assigned to vif->idx in the beginning. This causes problems
later when we try to reference a particular interface and also while
configuring the firmware.

This patch moves the assignment to vif->idx from the beginning
of the block to after wl->vif_num is updated with latest value of i.

Fixes: commit 735bb39ca3 ("staging: wilc1000: simplify vif[i]->ndev accesses")
Cc: <stable@vger.kernel.org>
Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:00:44 +02:00
Aditya Shankar 5600da662e staging: wilc1000: Use new format for configuring firmware
The configuration packet format has changed in the newer wilc
firmware versions 14.2 and up. This update ensures that the
firmware is initialized correctly by the host and configured
in the required mode.

Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 13:00:43 +02:00
Valerio Genovese 0f8931f1b3 staging: rtl8192u: ieee80211: Fix space required after }.
This was reported in checkpatch.pl:
ERROR: space required after that close brace '}'

Changes in v2:
add space after close brace '}' also at line 35, before it
was only for 34.

Signed-off-by: Valerio Genovese  <valerio.click@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:58:30 +02:00
Alfonso Lima Astor 62f9868990 staging: rtl8188eu: Remove extra spaces
Coding style problem detected by checkpatch.pl
ERROR: space prohibited before that ','

Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:58:30 +02:00
Alfonso Lima Astor 6cd43f0ca0 staging: rtl8188eu: Macros with complex values should be enclosed in parentheses
This macro is not used and also had a style error. I have run
grep and compiled the module to be sure.

Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:58:29 +02:00
Riku Salminen bbc2a2df92 Staging: nvec: Remove FSF's mailing address
Removed Free Software Foundation's address from the copyright notice
and replaced it with a link to http://www.gnu.org/licenses

Signed-off-by: Riku Salminen <riku@laatikko.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:55:25 +02:00
Arnd Bergmann 54f74b492f staging: comedi: labpc: fix isadma dependency
When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable
module, thhe ISA DMA code is not reachable by the common module, causing
a link error:

drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to `labpc_handle_dma_status'
ni_labpc_common.c:(.text+0x1d1cb): undefined reference to `labpc_drain_dma'
drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'

This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will
also be builtin for that case. This looks like a rather old bug, but
I have never seen this in randconfig testing until today.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:54:09 +02:00
Hans de Goede 554c0a3abf staging: Add rtl8723bs sdio wifi driver
The rtl8723bs is found on quite a few systems used by Linux users,
such as on Atom systems (Intel Computestick and various other
Atom based devices) and on many (budget) ARM boards such as
the CHIP.

The plan moving forward with this is for the new clean,
written from scratch, rtl8xxxu driver to eventually gain
support for sdio devices. But there is no clear timeline
for that, so lets add this driver included in staging for now.

Cc: Bastien Nocera <hadess@hadess.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <jes.sorensen@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:52:39 +02:00
Dan Cashman 38ca74e58f staging: vt6656: Split arguments to avoid 80-char violation in rf.c
Wrap arguments of call to vnt_control_out() to avoid exceeding 80
character limit, but maintain alignment.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
Dan Cashman 04a218becb staging: vt6656: Replace embedded function name with __func__ in rf.c
Change embedded function name in vnt_rf_set_txpower with %s format with
__func__ argument to make it consistent with other part of if-else and
kernel coding style standards as reported by checkpatch.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
Dan Cashman a4dc9bd6a3 staging: vt6656: convert spaces to tabs for rf.c
Address checkpatch errors encountered in rf.c by removing use of spaces
and replacing with properly aligned tabs.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
David Kershner b0512faf60 staging: unisys: visorbus: fix kernel BUG discovered by day0 testing
Kernel day0 testing robot reported a kernel BUG at drivers/base/driver.c!
with the following call stack:

[   14.963563] ------------[ cut here ]------------
[   14.967298] kernel BUG at drivers/base/driver.c:153!
[   14.970948] invalid opcode: 0000 [#1] SMP
[   14.974013] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc4-00790-g0789e2c #1
[   14.978221] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[   14.983417] task: ffff88001ea46040 task.stack: ffffc90000008000
[   14.987315] RIP: 0010:driver_register+0xa1/0xd0
[   14.990044] RSP: 0000:ffffc9000000be60 EFLAGS: 00010246
[   14.993039] RAX: 0000000000000000 RBX: ffffffff831d4c20 RCX: 0000000000000000
[   14.997040] RDX: 000000000000004d RSI: ffffffff831d47c0 RDI: ffffffff831d4c20
[   15.001511] RBP: ffffc9000000be78 R08: ffffc9000000be78 R09: ffffc9000000be7c
[   15.006163] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[   15.010068] R13: 00000000ffffffff R14: ffffffff832f3923 R15: 0000000000000000
[   15.013715] FS:  0000000000000000(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[   15.017460] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   15.021268] CR2: 0000000000000000 CR3: 0000000003009000 CR4: 00000000000006b0
[   15.025633] Call Trace:
[   15.028069]  ? visorbus_register_visor_driver+0x3f/0x60
[   15.031065]  ? init_unisys+0x3a/0x90
[   15.033562]  ? device_resume_response+0x50/0x50
[   15.036083]  visorinput_init+0x10/0x20
[   15.038937]  do_one_initcall+0x9a/0x164
[   15.041838]  ? set_debug_rodata+0x12/0x12
[   15.045333]  kernel_init_freeable+0x11e/0x1a1
[   15.048369]  ? rest_init+0x80/0x80
[   15.050813]  kernel_init+0x9/0x100
[   15.053353]  ret_from_fork+0x2c/0x40
[   15.056009] Code: ff 85 c0 41 89 c4 75 13 48 8b 7b 70 31 f6 e8 97 16 be ff 44 89 e0 5b 41 5c 5d c3 48 89 df e8 57 e1 ff ff 44 89 e0 5b 41 5c 5d c3 <0f> 0b 48 8b 33 48 c7 c7 a0 dd d5 82 e8 ec f0 6f ff 48 8b 73 08
[   15.065144] RIP: driver_register+0xa1/0xd0 RSP: ffffc9000000be60
[   15.068360] ---[ end trace 7d13369c38d80a8f ]---

This bug will occur if the visorbus driver is built-in to the kernel, and
the resulting kernel is run in an environment where visorbus devices are
NOT supported, and an attempt is made to load any of the drivers: visorhba,
visornic, or visorinput.

Checked to see if we have called bus_register, if not do not call
driver_register.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Fixes: 5b6f9b95f7 ("staging: unisys: visorbus: get rid of create_bus_type.")
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:49:36 +02:00
Thomas Jespersen bca74ee5fe staging: unisys: visornic: Replace symbolic perms with octal
Replace symbolic permissions S_IRUSR and S_IWUSR for their octal
counterparts

Signed-off-by: Thomas Jespersen <laumann.thomas@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:49:36 +02:00
Darryl T. Agostinelli 008b5d2845 staging: lustre: fixed ../include/lustre_debug.h is included more than once.
$ make includecheck
./drivers/staging/lustre/lustre/ptlrpc/layout.c: ../include/lustre_debug.h is included more than once.

Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:45:44 +02:00
Pushkar Jambhlekar d9f5af4a4d drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations
Adding a blank line after declaration

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:45:44 +02:00
Christian Gromm b2e8aa52e2 staging: most: usb: pass correct register table
Inside the function store_value() the table of writable registers need to
be passed to function get_static_reg_addr() or else the correct register
address is never going to be found.

Reported-by: Alex Riesen <alexander.riesen@cetitec.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Andrey Shvetsov 5c13155d19 staging: most: usb: fix size overflow
Despite the user payload may not be bigger than (2**16 - 1) bytes, the
final packet size may be bigger because of the gap space needed for the
controller.

This patch removes the temporary variables of the type u16 that are used
to hold the offsets that may be bigger than 2**16 bytes.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Andrey Shvetsov f500192890 staging: most: usb: fix calculation of the extra_len
The final size of the buffer used for the streaming transfer consists of
the size for the user payload (buffer_size) and the size for the gaps
needed by the controller (extra_len).

The current implementation of the hdm_configure_channel() corrects the
buffer size down to the next appropriate for the hardware value, that is
the whole number of frames, but uses the old unaligned value to
calculate the extra_len.

Current patch fixes the described problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Andrey Shvetsov 2c4aaa1fff staging: most: destroy cdev when channel gets disconnected
When a channel is being removed while an application holds the
corresponding character device, this device is going to be destroyed only
after the application closes the file descriptor and releases character
device. In case the channel appears again before the application closes the
file descriptor it holds, the channel cannot be linked.

This patch changes the described behavior and destroys the character
device at the time the channel get disconnected from the AIM.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:39 +02:00
Andrey Shvetsov 5f788625cd staging: most: consolidate attributes for list of links
This patch replaces three temporary variables representing the
attributes to control the links between the AIMs and HDMs with an array
of three elements to keep the corresponding code compact.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:39 +02:00
Andrey Shvetsov add98da7da staging: most: core: separate property showing links
Currently an AIM has the following properties available to manage links:
  - write-only "remove_link" used to remove a link from a list
  - read/write "add_link" used to add a link to a list and display them

This patch transfers the read functionality of "add_link" to the new
read-only property "links" to build consistent set of properties to control
the list of links.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:39 +02:00
Andrey Shvetsov 7dc70220e9 staging: most: core: consolidate channel attributes
This patch replaces 13 temporary variables representing the attributes
to control the channel with an array of 13 elements to keep the
corresponding code compact.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:39 +02:00
Christian Gromm 1c74e3ab95 staging: most: core: make use of __ATTR_* macros
This patch replaces the proprietary macros with those provided by the
kernel.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:40:44 +02:00
Christian Gromm 4dd7c7c7b3 staging: most: core: fix function names
This patch fixes the names of the show/store functions to match the naming
convention.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:40:44 +02:00
Andrey Shvetsov bf676f4ce2 staging: most: fix comment of the function remove_link_store
This patch replaces the name store_remove_link by the remove_link_store
in the comment for the corresponding function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:40:43 +02:00
Andrey Shvetsov 0b4194fd09 staging: most: fix comment of the function add_link_store
This patch replaces the name store_add_link by the add_link_store in the
comment for the corresponding function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:40:43 +02:00