Matt Ranostay [Thu, 25 Aug 2016 06:44:47 +0000 (23:44 -0700)]
iio: chemical: vz89x: abstract chip configuration
Abstract chip configuration data to allow supporting multiple variants
of the VZ89 chemical sensor line.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Thu, 25 Aug 2016 05:48:43 +0000 (22:48 -0700)]
iio: adc: ltc2485: add support for Linear Technology LTC2485 ADC
Adds basic support for the LTC2485 ADC - a delta-sigma analog-to-digital
converter with an I2C interface that operates in single shot conversion
mode.
The driver supports an on board 5V reference and the power-on default
configuration which rejects both 50hz & 60hz line frequencies and
operates in 1x speed mode.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Clifton Barnes [Tue, 23 Aug 2016 02:45:05 +0000 (22:45 -0400)]
staging: iio: accel: sca3000: remove extra space
fix checkpatch.pl warning about 'Statements should start on a
tabstop'
Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Matt Ranostay [Mon, 22 Aug 2016 22:19:37 +0000 (15:19 -0700)]
iio: iio-utils: use channel modifier scaling if it exists
Now there are channel modifiers with their own scaling those should be
used when possible over the generic channel type scaling.
Examples are of IIO_TEMP channel having a generic scaling value, and
another having IIO_MOD_TEMP_AMBIENT modifier with another scaling value.
Previously the first scaling value for a channel type would be applied
to all channels of like type in iio_generic_buffer
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Colin Ian King [Mon, 25 Jul 2016 22:40:01 +0000 (23:40 +0100)]
iio: ad5755: fix off-by-one on devnr limit check
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
comparison.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes:
c947459979c6 ("iio: ad5755: add support for dt bindings")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Greg Kroah-Hartman [Tue, 23 Aug 2016 21:50:16 +0000 (17:50 -0400)]
Merge tag 'iio-for-4.9a' of git://git./linux/kernel/git/jic23/iio into work-testing
Jonathan writes:
First round of new features, device support and cleanups for IIO in the 4.9 cycle.
Device support
* ak8974
- New driver and bindings for this 2009 vintage magnetometer (it was very
popular back then!)
* atlas-ph-sensor
- ORP sensor support(I had to look up what one of these was)
* cio-dac
- New driver for Measurement Computing DAC boards
* dmard06
- New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
* dmard09
- New driver for Domintech DMARD09 accelerometer.
* maxim-thermocouple
- max6675 and max31855 new driver
* mt6577 auxdac
- new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
hardware.
* ti-adc161s626
- new driver for this TI single channel differential ADC.
* vcnl4000
- support vcnl4010 and vcnl4020 which are compatible for all features
currently supported by this driver.
New features
* Core
- Allow retrieving of underlying iio_dev from a callback buffer handle.
This is needed to allow client drivers to perform operations such as
configuring the trigger used.
* hid-sensors
- asynchronous resume support to avoid really long resume times.
* kxcjk-1013
- add the mysterious KIOX000A ACPI id seen in the wild.
* Tools
- lsiio now enumerates processed as well as raw channels.
Cleanup
* ad7298
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ad7793
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
*
ade7854
- checkpatch fixups (alignment of parameters)
* atlas-ph-sensor
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
- Switch to REGCACHE_NONE as there are no useful register to cache.
* bma180
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* hdc100x
- Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
* isl29018
- Add driver specific prefixes to defines and function names.
- Remove excessive logging.
- Drop newlines which add nothing to readability.
- General tidying up of comments.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* isl29028
- Add driver specific prefixes to defines, enums and function names.
- Drop comma's from available attribute output as not ABI compliant.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* kxsd9
- devicetree bindings.
* mag3110
- This one wasn't locking to protect against mode switches during
raw_reads. Use the iio_claim_direct_mode function to fix this buglet.
* maxim-theromcouple
- Fix missing selects for triggered buffer support in Kconfig.
* nau7802
- Use complete instead of complete_all as only one completion at a time.
* sx9500
- Use complete instead of complete_all as only one completion at a time.
* us5182d
- Add a missing error code asignment instead of checking the result of
an already checked statement.
* vcnl4000
- Use BIT macro where appropriate.
- Refactor return codes in read_raw callback.
- Add some missing locking for concurrent accesses to the device.
Christian Gromm [Mon, 22 Aug 2016 14:46:24 +0000 (16:46 +0200)]
staging: most: aim-cdev: destroy ida struct in case of exception
This patch is needed to clean up the initialized ida structure in case
the function exits with an exception.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Mon, 22 Aug 2016 16:57:43 +0000 (12:57 -0400)]
staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages
The function mdc_adjust_dirpages is only called on platforms which
don't have pages 4K in size which is why kbuild only reported this
for platforms like the Alpha. The problem was a typo in ordering of
variables in the beginning of a while loop. We were accessing the
dp pointer before it was kmapped.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:36 +0000 (18:04 -0400)]
staging/lustre: Remove unused cp_error from struct cl_page
cp_error member is not really set anywhere, so kill
it and the only printing user of it too.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:35 +0000 (18:04 -0400)]
staging/lustre: Make alignment match open parenthesis
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:34 +0000 (18:04 -0400)]
staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}'
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)"
in Lustre code.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Walleij [Tue, 16 Aug 2016 13:33:27 +0000 (15:33 +0200)]
iio: accel: kxsd9: Add device tree bindings
This accelerometer can be probed from the device tree, so it needs
to have proper documentation of it's device tree bindings.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Srinivas Pandruvada [Mon, 15 Aug 2016 19:12:47 +0000 (12:12 -0700)]
iio: hid-sensors: use asynchronous resume
Some platforms power off sensor hubs during S3 suspend, which will require
longer time to resume. This hurts system resume time, so resume
asynchronously.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Zhiyong Tao [Thu, 18 Aug 2016 07:11:36 +0000 (15:11 +0800)]
iio: adc: mt2701: Add Mediatek auxadc driver for mt2701.
Add Mediatek auxadc driver based on iio.
It will register a device in iio and support iio.
So thermal can read auxadc channel to sample data by iio device.
It is tested successfully on mt2701 platform.
Mt8173 and mt6577 platforms are not tested.
But the expectation is compatible.
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Zhiyong Tao [Thu, 18 Aug 2016 07:11:35 +0000 (15:11 +0800)]
dt-bindings: auxadc: Add binding document for Mediatek auxadc.
The commit adds the device tree binding documentation for the mediatek
auxadc found on Mediatek MT2701.
Thermal gets auxadc sample data by iio device.
So the commit changes auxadc device tree binding documentation from
/soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Mon, 15 Aug 2016 23:09:36 +0000 (16:09 -0700)]
iio: temperature: add Kconfig selects for triggered buffer
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Thu, 18 Aug 2016 16:09:00 +0000 (09:09 -0700)]
iio: magnetometer: mag3110: claim direct mode during raw reads
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Louie Lu [Mon, 15 Aug 2016 10:44:41 +0000 (18:44 +0800)]
staging: rts5208: Change data type to unsigned int.
This patch fixes a minor checkpatch warning:
"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"
Signed-off-by: Louie Lu <louie.lu@hopebaytech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert [Fri, 12 Aug 2016 14:15:18 +0000 (16:15 +0200)]
staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV
mg_get_local_EKB and mg_get_ICV used to return with an error code before
releasing all resources. This patch add a jump to the appropriate label
ensuring that the resources are properly released before returning.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert [Fri, 12 Aug 2016 14:15:17 +0000 (16:15 +0200)]
staging: rts5208/ms.c: change the label name to respect the coding style
This patch changes label names using camel case to snake case as well as giving
a new name representing what will be done after the label.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonas Rickert [Sat, 30 Jul 2016 11:27:58 +0000 (13:27 +0200)]
Staging: rts5208: fix double blank line coding style issues
This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl
Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shiva Kerdel [Fri, 5 Aug 2016 20:14:41 +0000 (22:14 +0200)]
Staging: rtl8723au: rtw_ieee80211: Fixed operators spacing style issues
Fixed spaces around operators to fix their coding style issues.
Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Thu, 14 Jul 2016 10:21:28 +0000 (11:21 +0100)]
staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern
BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
comparisons with 0xffffffff are therefore a buggy check. Instead, check them
against 0x00ffffff.
Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
is an expected invalid bit pattern that should be checked before BT_Active and
BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
risky approach.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Sat, 2 Jul 2016 23:48:51 +0000 (19:48 -0400)]
staging: fsl-mc: make bus/mc-bus explicitly non-modular
The Kconfig currently controlling compilation of this code is:
config FSL_MC_BUS
bool "Freescale Management Complex (MC) bus driver"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since the code was already not using module_init, we don't have to change
the initcall and the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We don't replace module.h with init.h since the file does make some
references to "struct *module" for processing other modules.
Cc: "J. German Rivera" <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nipun Gupta [Wed, 29 Jun 2016 17:14:39 +0000 (22:44 +0530)]
fsl-mc: add helper macro to determine if a device is of fsl_mc type
Add a helper macro to return if a device has a bus type of fsl_mc.
This makes the bus driver code more readable and provides a way for
drivers like the SMMU driver to easily check the bus type.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 8 Jun 2016 07:40:55 +0000 (13:10 +0530)]
staging: r8723au: Remove unused semaphores
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and
io_req have no users, hence remove all references to them.
Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 8 Jun 2016 07:40:54 +0000 (13:10 +0530)]
staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 5 Jun 2016 19:11:19 +0000 (14:11 -0500)]
staging: r8188eu: Fix scheduling while atomic splat
Commit
fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu:
Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation
calls to be GFP_KERNEL even though the original wrapper was testing
to determine if the caller was in atomic mode. Most of the mistakes
were corrected with commit
33dc85c3c667209c930b2dac5ccbc2a365e06b7a
("staging: r8188eu: Fix scheduling while atomic error introduced in
commit
fadbe0cd"); however, two kzalloc calls were missed as the
call only happens when the driver is shutting down.
Fixes:
fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 5 Jun 2016 15:20:59 +0000 (10:20 -0500)]
staging: r8188eu: Remove some false positives from kmemleak
When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:37 +0000 (20:17 -0500)]
staging: r8712u: Handle some false positives from kmemleak
When this driver preallocates some URBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is reclaimed, therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:36 +0000 (20:17 -0500)]
staging: r8712u: Fix leak of skb
There are two types of messages queued for RX. The major type, which does
I/O on the device, was being handled properly. The skbs that communicated
with the firmware were being leaked.
While rewriting the code that sets up the skb, it was possible to remove
the private variable indicating that the old skb could be reused.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:35 +0000 (20:17 -0500)]
staging: r8712u: Check pointer before use
Routine r8712_usb_read_port() dereferences "precvbuf" before testing it
for NULL.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Parth Sane [Wed, 8 Jun 2016 11:27:45 +0000 (16:57 +0530)]
staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c
Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
This patch effectively fixes that.
Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anuradha Weeraman [Mon, 27 Jun 2016 07:42:16 +0000 (13:12 +0530)]
Staging: rtl8712: Fixed brace and comment style issue
Fixed issues with coding style.
Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:09 +0000 (09:54 +0530)]
rtl8712: intf_priv: Replace semaphore lock with completion
The semaphore 'lock' in 'intf_priv' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:08 +0000 (09:54 +0530)]
rtl8712: Replace semaphore terminate_cmdthread_sema with completion
The semaphore 'terminate_cmdthread_sema' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:07 +0000 (09:54 +0530)]
rtl8712: Replace semaphore cmd_queue_sema with completion
The semaphore 'cmd_queue_sema' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:56 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore ips_sem with mutex
The semaphore 'ips_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:55 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore scan_sem with mutex
The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:54 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore rf_sem with mutex
The semaphore 'rf_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:53 +0000 (14:56 +0530)]
rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex
The semaphore 'wx_sem' in the r8192_priv is a simple mutex,
so it should be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:52 +0000 (14:56 +0530)]
rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex
The semaphore 'wx_sem' in the rtllib_device is a simple mutex,
so it should be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:26:06 +0000 (17:26 +0200)]
staging/rtl8192e: avoid comparing unsigned type >= 0
There is one remaining warning about a type limit check in rtl8192e:
staging/rtl8192e/rtl819x_TSProc.c:326:14: error: comparison is always true due to limited range of data type [-Werror=type-limits]
This changes a macro into a local function to clarify the types and simplify
the check while removing the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:26:05 +0000 (17:26 +0200)]
staging/rtl8192e: use s8 instead of char
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192e/rtl8192e/r8192E_phy.c:1072:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/r8192E_phy.c:1104:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_core.c:1987:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_dm.c:782:37: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtllib_softmac_wx.c:465:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:13:58 +0000 (17:13 +0200)]
staging/rtl8192u: use s8 instead of char
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:29:30 +0000 (12:29 +0700)]
staging: rtl8188eu: remove _EFUSE_DEF_TYPE enum
This enumeration does not used.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:29:02 +0000 (12:29 +0700)]
staging: rtl8188eu: remove EFUSE_GetEfuseDefinition function
This function does not used.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:28:43 +0000 (12:28 +0700)]
staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_AVAILABLE_EFUSE_BYTES_BANK, &a) call with a = (EFUSE_REAL_CONTENT_LEN_88E - EFUSE_OOB_PROTECT_BYTES_88E)
This makes the code easier to read.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:28:20 +0000 (12:28 +0700)]
staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAX_SECTION, &a) with a = EFUSE_MAX_SECTION_88E
This makes the code easier to read.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:27:37 +0000 (12:27 +0700)]
staging: rtl8188eu: remove efuse_max variable in hal_EfusePartialWriteCheck
This variable does not used after assigning value.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:26:51 +0000 (12:26 +0700)]
staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAP_LEN, ...) call with it's result (EFUSE_MAP_LEN_88E)
This makes the code easier to read.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Mon, 6 Jun 2016 04:38:07 +0000 (10:08 +0530)]
rtl8188eu: Remove unused semaphores
The semaphores xmit_sema, terminate_xmitthread_sema and tx_retevt
have no users, hence remove all references to them.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Mon, 6 Jun 2016 04:38:06 +0000 (10:08 +0530)]
rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
_enter_pwrlock was using down_interruptible(), so the lock could be broken
by sending a signal. This could be a bug, because nothing checks the return
code here. Hence, using mutex_lock instead of the interruptible version.
Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock,
_exit_pwrlock and _rtw_down_sema.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Mon, 6 Jun 2016 04:38:05 +0000 (10:08 +0530)]
rtl8188eu: Replace semaphore terminate_cmdthread_sema with completion
The semaphore 'terminate_cmdthread_sema' is used as completion,
so convert it to struct completion.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Mon, 6 Jun 2016 04:38:04 +0000 (10:08 +0530)]
rtl8188eu: Replace semaphore cmd_queue_sema with completion
The semaphore 'cmd_queue_sema' is used as completion,
so convert it to struct completion.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 15 Aug 2016 14:45:04 +0000 (15:45 +0100)]
staging: ks7010: don't print skb->dev->name if skb is null
A null pointer dereference will occur when skb is null and
skb->dev->name is printed. Replace the skb->dev->name with
plain text "ks_wlan" to fix this.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Mc Guire [Mon, 25 Jul 2016 19:22:27 +0000 (21:22 +0200)]
staging: ks7010: declare private functions static
Private functions in ks_hostif.c can be declared static.
Fixes:
13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Mc Guire [Mon, 25 Jul 2016 19:21:50 +0000 (21:21 +0200)]
staging: ks7010: fix wait_for_completion_interruptible_timeout return handling
wait_for_completion_interruptible_timeout return 0 on timeout and
-ERESTARTSYS if interrupted. The check for
!wait_for_completion_interruptible_timeout() would report an interrupt
as timeout. Further, while HZ/50 will work most of the time it could
fail for HZ < 50, so this is switched to msecs_to_jiffies(20).
Fixes:
13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Sat, 9 Jul 2016 01:33:08 +0000 (21:33 -0400)]
staging: vt6655: power.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line
Remove '+' postfix and '-' prefix from the start and end of block comments
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Sat, 9 Jul 2016 01:27:05 +0000 (21:27 -0400)]
staging: vt6655: Fix checkpatch warning
Fix warning by checkpatch.pl
Add * for block comments on subsequent lines
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Fri, 8 Jul 2016 22:22:37 +0000 (18:22 -0400)]
staging: vt6655: channel.c: Fix block comments usage warning by checkpatch.pl
This patch fixes the following checkpatch.pl warnings:
WARNING: Block comments use * on subsequent lines
+ /* TX_PE will reserve 3 us for MAX2829 A mode only,
+ it is for better TX throughput */
WARNING: Block comments use a trailing */ on a separate line
+ it is for better TX throughput */
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Mon, 27 Jun 2016 14:52:04 +0000 (20:22 +0530)]
staging:vt6656:dpc.h:fix parantheses alignment
The following patch fixes "Alignment should match open parantheses"
check thrown by checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Mon, 27 Jun 2016 13:56:55 +0000 (19:26 +0530)]
staging:vt6656:dpc.c:Fix spaces
The following patch fixes two checks thrown by checkpatch.pl, "Spaces
preferred around '+'" and "No space is necessary after a cast"
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Mon, 27 Jun 2016 13:51:28 +0000 (19:21 +0530)]
staging:vt6656:dpc.c:Fix parantheses alignment
This patch fixes "Alignment should match open parantheses" check
thrown by checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Fri, 17 Jun 2016 06:55:42 +0000 (12:25 +0530)]
staging:vt6656:baseband.h: Fix alignment issue
Fix "Alignment should match open paranthesis" check thrown by
checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Fri, 17 Jun 2016 03:56:47 +0000 (09:26 +0530)]
staging:vt6656:card.c: fix camel case issue
Fix "Avoid camel case" issue thrown by checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Fri, 17 Jun 2016 03:53:42 +0000 (09:23 +0530)]
staging:vt6656:card.c: fix blank line issue
Fix "Please use a blank line after function declaration" check thrown
by checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Fri, 17 Jun 2016 03:51:28 +0000 (09:21 +0530)]
staging:vt6656:card.c: fix blank lines issue
Fix "Blank lines aren't necessary after an open brace" check thrown by
checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Fri, 17 Jun 2016 04:27:31 +0000 (09:57 +0530)]
staging:vt6656:card.c:fix alignment checks
Fix "Alignment should match with open paranthesis" check thrown by
checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rithvik Patibandla [Sat, 11 Jun 2016 20:08:58 +0000 (01:38 +0530)]
staging:vt6656:card.c:Fix comment block issue
Fix "Block comments use * on subsequent lines" and "Block comments use
*/ on trailing lines" warnings thrown by checkpatch.pl
Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Edward Lipinsky [Sat, 23 Jul 2016 18:57:25 +0000 (11:57 -0700)]
staging: sm750fb: Fix block comment style
This patch fixes the checkpatch.pl warning:
WARNING: Block comments use * on subsequent lines
Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wolz [Thu, 23 Jun 2016 12:00:13 +0000 (14:00 +0200)]
sm750fb/sm750_hw.c: split assignment & long lines
Split lines over 80 characters and separated assignments.
Signed-off-by: Stefan Wolz <wolzstefan@web.de>
Signed-off-by: Christian Halder <christian.halder@fau.de>
Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wolz [Thu, 23 Jun 2016 12:00:12 +0000 (14:00 +0200)]
sm750fb/sm750_hw.c: fixed comments
Fixed multiline comments to meet style standards,
fixed typos and split comment lines over 80 characters.
Signed-off-by: Stefan Wolz <wolzstefan@web.de>
Signed-off-by: Christian Halder <christian.halder@fau.de>
Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wolz [Thu, 23 Jun 2016 12:00:11 +0000 (14:00 +0200)]
sm750fb/sm750_hw.c: fixed whitespacing
Deleted unnecessary newlines and added whitespaces around operators.
Signed-off-by: Stefan Wolz <wolzstefan@web.de>
Signed-off-by: Christian Halder <christian.halder@fau.de>
Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wolz [Thu, 23 Jun 2016 12:00:10 +0000 (14:00 +0200)]
sm750fb/sm750_hw.c: corrected alignment
Fixed alignment in multiline declarations.
Signed-off-by: Stefan Wolz <wolzstefan@web.de>
Signed-off-by: Christian Halder <christian.halder@fau.de>
Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
yeongjun Kim [Tue, 14 Jun 2016 15:36:07 +0000 (00:36 +0900)]
staging: sm750fb: fix block comments errors in ddk750_display.c
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: yeongjun Kim <iam.yeongjunkim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Moshe Green [Mon, 6 Jun 2016 19:04:32 +0000 (22:04 +0300)]
Staging: sm750fb: fix block comment coding style issue in ddk750_chip.c
This is a patch to the ddk750_chip.c file that fixes up two block
comment coding style warnings found by the checkpatch.pl tool
Signed-off-by: Moshe Green <mgmoshes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Moshe Green [Sun, 5 Jun 2016 19:09:24 +0000 (22:09 +0300)]
Staging: sm750fb: fix line length coding style issue in ddk750_chip.c
This is a patch to the ddk750_chip.c file that fixes up a line length
warning found by the checkpatch.pl tool
Signed-off-by: Moshe Green <mgmoshes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Moshe Green [Wed, 1 Jun 2016 20:34:21 +0000 (23:34 +0300)]
Staging: sm750fb: fix a line length coding style warning in ddk750_chip.c
This is a patch to the ddk750_chip.c file that fixes up a
line length warning found by the checkpatch.pl tool.
Signed-off-by: Moshe Green <paledirac@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Samuele Baisi [Tue, 5 Jul 2016 11:33:59 +0000 (13:33 +0200)]
Staging: gdm724x: gdm_tty: Fixed a checkpatch check issue.
Removed a blankline after an opening bracket.
Signed-off-by: Samuele Baisi <ciccio87@gmail.com>
Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 15 Jun 2016 05:40:03 +0000 (11:10 +0530)]
staging: gdm724x: Replace semaphore netlink with mutex
Replace semaphore netlink_mutex with mutex. Semaphores are
going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luis de Bethencourt [Tue, 31 May 2016 14:39:13 +0000 (15:39 +0100)]
staging: gdm724x: gdm_usb: Remove ignored value
The value assigned to ret will be overwritten before it could be read in a
future iteration of the loop. Removing the unnecessary assignment.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Reynes [Fri, 15 Jul 2016 23:13:35 +0000 (01:13 +0200)]
net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings
There are two generics functions phy_ethtool_{get|set}_link_ksettings,
so we can use them instead of defining the same code in the driver.
There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this
check is already done in dev_ethtool, so no need to repeat it before
calling the generic function.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Reynes [Fri, 15 Jul 2016 23:13:34 +0000 (01:13 +0200)]
net: ethernet: octeon: use phydev from struct net_device
The private structure contain a pointer to phydev, but the structure
net_device already contain such pointer. So we can remove the pointer
phydev in the private structure, and update the driver to use the
one contained in struct net_device.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 29 Jun 2016 12:20:46 +0000 (15:20 +0300)]
staging: octeon: delete redundant log message
There will be a separate banner message after pow0 is set up (or an
error message if it failed).
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 29 Jun 2016 12:20:45 +0000 (15:20 +0300)]
staging: octeon: check for pow0 before calling interface helper
Check for pow0 port first before calling the interface helper. This
avoids the following error log when setting up pow0 interface:
cvmx_helper_get_interface_num: Illegal IPD port number
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 29 Jun 2016 12:20:44 +0000 (15:20 +0300)]
staging: octeon: validate interface before calling INDEX
Some helper functions call INDEX before checking if the interface is
valid. Since pow0 is not a real interface, we get the following errors:
cvmx_helper_get_interface_index_num: Illegal IPD port number
Fix by using INDEX only when needed with real interfaces.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:19 +0000 (23:09 +0200)]
staging: slicoss: simplify struct for statistics
Merge several structures for statistics to one structure and remove
unnecessary union nesting.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:18 +0000 (23:09 +0200)]
staging: slicoss: improve implementation concerning the shared memory
Remove the volatile specifiers of struct slic_shmem. Furthermore store the
bus addresses for the isr pointer, link status and statistics separately
and access the upper and lower word of these addresses by means of
[lower|upper]_32_bits(). By doing this take the endianness into account.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:17 +0000 (23:09 +0200)]
staging: slicoss: dont use a structure but offsets for register accesses
Use the new register accessors that use offsets instead of the slic_regs
structure to read/write registers. Since not longer needed remove the
structure completley.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:16 +0000 (23:09 +0200)]
staging: slicoss: avoid PCI write posting
Introduce the function slic_flush_write() which reads from the HOSTID
register and can be used to avoid PCI write posting. Use the function at
several critical places in the code.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:15 +0000 (23:09 +0200)]
staging: slicoss: introduce register accessors that use register offsets
Introduce accessor functions that read and write registers by using a
register offset.
This is in preparation to replace the register addressing by means of the
slic_regs struct with an addressing by means of offsets.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:14 +0000 (23:09 +0200)]
staging: slicoss: start tx queue when interface is brought up
There is no reason to delay tx queue activation until a link is detected.
So start the queue when the interface is brought up and stop it when the
interface is brought down.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:13 +0000 (23:09 +0200)]
staging: slicoss: ensure mapping of io-memory is uncached
Writes to registers should be done uncached for various reasons. Ensure
this by replacing ioremap() with ioremap_nocache().
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:12 +0000 (23:09 +0200)]
staging: slicoss: notifiy network stack about change in link state
Notify the network stack about link states via netif_carrier_[off|on]().
Also set the link state off initially and when the interface is brought
down.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lino Sanfilippo [Thu, 14 Jul 2016 22:13:56 +0000 (00:13 +0200)]
staging: slicoss: handle allocation failure in slic_init_adapter
The memory allocation in slic_init_adapter() can fail. Return an error in
this case and unwind properly. Also make sure that the allocated memory is
properly freed in case of an error in the calling probe() function.
By doing this also replace the alloc() followed by memset to zero the
memory with a zalloc() version.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Tue, 16 Aug 2016 18:56:12 +0000 (14:56 -0400)]
staging: dgnc: fix 'line over 80 characters'
fix checkpatch.pl warning about 'line over 80 characters'.
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Prit Raj [Sun, 31 Jul 2016 03:05:16 +0000 (08:35 +0530)]
staging: fbtft: This patch fixes the checkpatch.pl warning
WARNING: Statements should start on a tabstop
Signed-off-by: Prit Raj <prit.adra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ming Yang [Mon, 18 Jul 2016 02:13:18 +0000 (19:13 -0700)]
Staging: fbtft: fixed unsigned type warnings
Replace unsigned by unsigned int in fbtft driver. Issue found by
checkpatch.
Signed-off-by: Ming Yang <minos.future@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michal Suchanek [Thu, 9 Jun 2016 15:08:42 +0000 (15:08 +0000)]
staging: fbtft: do not allocate huge txbuf
txbuflen can be set to arbitrary value by user and it is also set
automagically to the maximum transfer size of the SPI master controller.
Do not allocate the buffer when larger than vmem. When my SPI master
controller reports maximum transfer size 16M the probe of fbtft fails.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>