Roberta Dobrescu [Thu, 16 Apr 2015 19:20:57 +0000 (22:20 +0300)]
staging: iio: light: isl29018: Remove non-standard sysfs attributes
This patch removes non-standard sysfs attributes range, range_available,
adc_resolution and adc_resolution_available. It also removes the
corresponding show and store functions.
This is in preparation for using standard IIO attributes in order to move
the code out of staging.
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:59 +0000 (18:40 +0300)]
iio: accel: mma9553: fix gpio bitnum init value
Initial value of gpio bitnum is set to -1, but
the variable is declared as unsigned.
Use a positive invalid value for initial gpio
bitnum.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:41:00 +0000 (18:41 +0300)]
iio: accel: mma9553: refactor mma9553_read_raw
Refactor code for simplicity and clarity.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:58 +0000 (18:40 +0300)]
iio: accel: mma9553: prefix naming fixes
Add mma9553_ prefix to all local functions/declarations.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:57 +0000 (18:40 +0300)]
iio: accel: mma9553: use GENMASK
Use GENMASK instead of BIT or direct value to
define a mask.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:56 +0000 (18:40 +0300)]
iio: accel: mma9553: comment and error message fixes
Use "GPIO" instead of "gpio" and "ACPI" instead of "acpi".
Includes a couple of small style fixes in comments
(missing full stop, whitespace, paranthesis).
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:55 +0000 (18:40 +0300)]
iio: accel: mma9553: return 0 as indication of success
Use return 0 instead of return ret to mark
clearly the success return path.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:54 +0000 (18:40 +0300)]
iio: accel: mma9553: check for error in reading initial activity and stepcnt
When configuring gpio, we need to read initial values for activity and
step count. This function may fail due to i2c read errors.
Check the error code returned by mma9553_read_activity_stepcnt
and return the appropriate error in gpio config function.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:53 +0000 (18:40 +0300)]
iio: accel: mma9551_core: typo fix in RSC APP ID
Fix typo in Reset/Suspend/Clear Application ID definition.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Mon, 13 Apr 2015 15:40:52 +0000 (18:40 +0300)]
iio: accel: mma9551_core: wrong doc fixes
Fix docummentation for mma9553_read_* functions.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Tue, 21 Apr 2015 16:11:00 +0000 (19:11 +0300)]
iio: ltr501: Add support for ltr301 chip
Added support for Liteon 301 Ambient light sensor. Since
LTR-301 and LTR-501 are register compatible(and even have same
part id), LTR-501 driver has been extended to support both
devices. LTR-501 is similar to LTR-301 in ALS sensing, But the
only difference is, LTR-501 also supports proximity sensing.
LTR-501 - ALS + Proximity combo
LTR-301 - ALS sensor.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Tue, 21 Apr 2015 16:10:59 +0000 (19:10 +0300)]
iio: ltr501: Add support for ltr559 chip
This device is register compatible with LTR501, with a minor difference for
ALS control register as showed below:
ALS Control register for LTR501:
7 6 5 4 3 2 1 0
+------+------+------+------+------+------+------+------+
| | | | |
| Reserved | Gain | SW | ALS Mode |
| | | Reset| |
+------+------+------+------+------+------+------+------+
ALS Control register for LTR559:
7 6 5 4 3 2 1 0
+------+------+------+------+------+------+------+------+
| | | | |
| Reserved | Gain | SW | ALS |
| | | Reset| Mode |
+------+------+------+------+------+------+------+------+
We handle this difference by introducing ltr501_chip_info.
Datasheet for LTR559 is at:
http://optoelectronics.liteon.com/upload/download/DS86-2013-0003/S_110_LTR-559ALS-01_DS_V1.pdf
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kuppuswamy Sathyanarayanan [Sun, 19 Apr 2015 09:10:04 +0000 (02:10 -0700)]
iio: ltr501: Add ACPI enumeration support
Added ACPI enumeration support for LTR501 chip.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kuppuswamy Sathyanarayanan [Sun, 19 Apr 2015 09:10:03 +0000 (02:10 -0700)]
iio: ltr501: Add interrupt rate control support
Added rate control support for ALS and proximity
threshold interrupts.Also, Added support to modify
and read ALS & proximity sensor sampling frequency.
LTR-501 supports interrupt rate control using persistence
register settings. Writing <n> to persistence register
would generate interrupt only if there are <n> consecutive
data values outside the threshold range.
Since we don't have any existing ABI's to directly
control the persistence register count, we have implemented
the rate control using IIO_EV_INFO_PERIOD. _period event
attribute represents the amount of time in seconds an
event should be true for the device to generate the
interrupt. So using _period value and device frequency,
persistence count is calculated in driver using following
logic.
count = period / measurement_rate
If the given period is not a multiple of measurement rate then
we round up the value to next multiple.
This patch also handles change to persistence count whenever
there is change in frequency.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kuppuswamy Sathyanarayanan [Sun, 19 Apr 2015 09:10:02 +0000 (02:10 -0700)]
iio: ltr501: Add interrupt support
This patch adds interrupt support for Liteon 501 chip.
Interrupt will be generated whenever ALS or proximity
data exceeds values given in upper and lower threshold
register settings.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kuppuswamy Sathyanarayanan [Sun, 19 Apr 2015 09:10:01 +0000 (02:10 -0700)]
iio: ltr501: Add integration time support
Added support to modify and read ALS integration time.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Wed, 15 Apr 2015 20:39:38 +0000 (22:39 +0200)]
iio:tmp006: Prefix #defines with TMP006_
just cleanup, no functional change
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Wed, 15 Apr 2015 20:39:37 +0000 (22:39 +0200)]
iio:tsl2563: Use tsl2563_ prefix for driver's functions
just cleanup, no functional change
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Wed, 15 Apr 2015 20:39:36 +0000 (22:39 +0200)]
iio:tsl4531: Fix leftover TCS3472_ prefix in tsl4531 driver
just cleanup, no functional change
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Sun, 12 Apr 2015 17:09:21 +0000 (20:09 +0300)]
iio: sx9500: add GPIO reset pin
If a GPIO reset pin is listed in ACPI or Device Tree, use it to reset
the device on initialization.
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Sun, 12 Apr 2015 17:09:20 +0000 (20:09 +0300)]
iio: sx9500: refactor GPIO interrupt code
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Sun, 12 Apr 2015 17:09:19 +0000 (20:09 +0300)]
iio: sx9500: optimize power usage
In the interest of lowering power usage, we only activate the proximity
channels and interrupts that we are currently using.
For raw reads, we activate the corresponding channel and the data ready
interrupt and wait for the interrupt to trigger. If no interrupt is
available, we wait for the documented scan period, as specified in the
datasheet.
The following types of usage patterns may overlap:
* raw proximity reads (need a single data ready interrupt)
* trigger usage (needs data ready interrupts as long as active)
* proximity events (need near/far interrupts)
* triggered buffer reads (don't need any interrupts, but are usually
coupled with our own trigger.
To mitigate all possible patterns, we implement usage counting for all
the resources used: data ready interrupts, near/far interrupts and
individual channels.
The device enters sleep mode as documented in the data sheet when its
buffer, trigger and events are disabled, and no raw reads are currently
running.
Because of this new usage pattern, it is important that we give the
device a chance to perform an initial compensation for all its channels
at probe time.
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Fri, 17 Apr 2015 14:05:35 +0000 (16:05 +0200)]
iio: mlx90614: Fix duplicate const warning
Fix a typo triggering a duplicate const warning on some compilers.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kuppuswamy Sathyanarayanan [Sat, 18 Apr 2015 05:15:10 +0000 (22:15 -0700)]
iio: ltr501: Add regmap support.
Added regmap support. It will be useful to handle
bitwise updates to als & ps control registers.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Fri, 3 Apr 2015 12:47:34 +0000 (15:47 +0300)]
iio: sx9500: fix formatting
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Fri, 3 Apr 2015 12:47:31 +0000 (15:47 +0300)]
iio: sx9500: rename GPIO interrupt pin
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Fri, 3 Apr 2015 12:47:29 +0000 (15:47 +0300)]
iio: sx9500: add power management
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Thu, 9 Apr 2015 14:17:47 +0000 (17:17 +0300)]
iio: light: ltr501: Fix alignment to match open parenthesis
This makes ltr501 code consistent with the coding style adopted
for the new drivers added to IIO.
We prepare the path for adding support for LTR559 chip.
Reported by checkpatch.pl
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vignesh R [Tue, 31 Mar 2015 11:12:36 +0000 (16:42 +0530)]
iio: adc: ti_am335x_adc: refactor DT parsing into a function
Refactor DT parsing into a separate function from probe() to
help addition of more DT parameters later.
No functional changes.
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Mon, 30 Mar 2015 08:35:02 +0000 (10:35 +0200)]
iio: mlx90614: Check for errors in read values
The device uses the MSB of the returned temperature value as an error
flag. Return a read error when this bit is set.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Mon, 30 Mar 2015 08:35:01 +0000 (10:35 +0200)]
iio: mlx90614: Add power management
Add support for system sleep and runtime power management.
To wake up the device, the SDA line should be held low for at least 33ms
while SCL is high. As this is not possible using the i2c API (and not
supported by all i2c adapters), a GPIO connected to the SDA line is
needed. The GPIO is named "wakeup" and can be specified in a device
tree with the "wakeup-gpios" binding.
If the wake-up GPIO is not given, disable power management for the
device. Entering sleep requires an SMBus byte access, hence power
management is also disabled if byte access is not supported by the
adapter.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Mon, 30 Mar 2015 08:35:00 +0000 (10:35 +0200)]
iio: mlx90614: Add emissivity setting
The mapping from the 16-bit EEPROM value to the decimal 0-1 range is
approximate. A special case ensures 0xFFFF shows as 1.0 instead of
0.
999998565.
Writing to EEPROM requires an explicit erase by writing zero. In
addition, it takes 20ms for the erase/write to complete. During this
time no EEPROM register should be accessed. Therefore, two msleep()s
are added to the write function and a mutex protects against concurrent
access.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Mon, 30 Mar 2015 08:34:59 +0000 (10:34 +0200)]
iio: mlx90614: Add devicetree bindings documentation
Also introduce "melexis" as a vendor prefix for device tree bindings.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vianney le Clément de Saint-Marcq [Mon, 30 Mar 2015 08:34:58 +0000 (10:34 +0200)]
iio: core: Introduce IIO_CHAN_INFO_CALIBEMISSIVITY
Contact-less IR temperature sensors measure the temperature of an object
by using its thermal radiation. Surfaces with different emissivity
ratios emit different amounts of energy at the same temperature.
IIO_CHAN_INFO_CALIBEMISSIVITY allows the user to inform the sensor of the
emissivity of the object in front of it, in order to effectively measure
its temperature.
A device providing such setting is Melexis's MLX90614:
http://melexis.com/Assets/IR-sensor-thermometer-MLX90614-Datasheet-5152.aspx.
Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vlad Dogaru [Fri, 3 Apr 2015 12:03:02 +0000 (15:03 +0300)]
iio: accel: kxcjk1013: allow using an external trigger
In its present state, the driver mandates that its buffer only be
triggered by one of the device's own triggers (data ready or any
motion). This is not always desirable, for example because the
interrupt pins may not be wired in.
Patch the driver to be able to accept using an external trigger, such as
one based on hrtimer. When using such a trigger, we need to ensure that
the device is powered on when the buffer is started. We do that by
setting setup_ops for the buffer.
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Roberta Dobrescu [Sat, 28 Mar 2015 19:43:08 +0000 (21:43 +0200)]
tools: iio: Add iio targets in tools Makefile
This patch adds targets for building and cleaning iio tools to tools/Makefile.
To build iio tools from the toplevel kernel directory one should call:
$ make -C tools iio
and for cleaning it
$ make -C tools iio_clean
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Greg Kroah-Hartman [Tue, 7 Apr 2015 09:03:02 +0000 (11:03 +0200)]
Merge 4.0-rc7 into staging-next
We want those fixes (iio primarily) into the -next branch to help with
merge and testing issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Mon, 6 Apr 2015 22:39:45 +0000 (15:39 -0700)]
Linux 4.0-rc7
Linus Torvalds [Mon, 6 Apr 2015 22:19:59 +0000 (15:19 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) In TCP, don't register an FRTO for cumulatively ACK'd data that was
previously SACK'd, from Neal Cardwell.
2) Need to hold RNL mutex in ipv4 multicast code namespace cleanup,
from Cong WANG.
3) Similarly we have to hold RNL mutex for fib_rules_unregister(), also
from Cong WANG.
4) Revert and rework netns nsid allocation fix, from Nicolas Dichtel.
5) When we encapsulate for a tunnel device, skb->sk still points to the
user socket. So this leads to cases where we retraverse the
ipv4/ipv6 output path with skb->sk being of some other address
family (f.e. AF_PACKET). This can cause things to crash since the
ipv4 output path is dereferencing an AF_PACKET socket as if it were
an ipv4 one.
The short term fix for 'net' and -stable is to elide these socket
checks once we've entered an encapsulation sequence by testing
xmit_recursion.
Longer term we have a better solution wherein we pass the tunnel's
socket down through the output paths, but that is way too invasive
for 'net' and -stable.
From Hannes Frederic Sowa.
6) l2tp_init() failure path forgets to unregister per-net ops, from
Cong WANG.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
net/mlx4_core: Fix error message deprecation for ConnectX-2 cards
net: dsa: fix filling routing table from OF description
l2tp: unregister l2tp_net_ops on failure path
mvneta: dont call mvneta_adjust_link() manually
ipv6: protect skb->sk accesses from recursive dereference inside the stack
netns: don't allocate an id for dead netns
Revert "netns: don't clear nsid too early on removal"
ip6mr: call del_timer_sync() in ip6mr_free_table()
net: move fib_rules_unregister() under rtnl lock
ipv4: take rtnl_lock and mark mrt table as freed on namespace cleanup
tcp: fix FRTO undo on cumulative ACK of SACKed range
xen-netfront: transmit fully GSO-sized packets
Jack Morgenstein [Sun, 5 Apr 2015 14:50:48 +0000 (17:50 +0300)]
net/mlx4_core: Fix error message deprecation for ConnectX-2 cards
Commit
1daa4303b4ca ("net/mlx4_core: Deprecate error message at
ConnectX-2 cards startup to debug") did the deprecation only for port 1
of the card. Need to deprecate for port 2 as well.
Fixes: 1daa4303b4ca ("net/mlx4_core: Deprecate error message at ConnectX-2 cards startup to debug")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Nakonechny [Sat, 4 Apr 2015 21:46:21 +0000 (00:46 +0300)]
net: dsa: fix filling routing table from OF description
According to description in 'include/net/dsa.h', in cascade switches
configurations where there are more than one interconnected devices,
'rtable' array in 'dsa_chip_data' structure is used to indicate which
port on this switch should be used to send packets to that are destined
for corresponding switch.
However, dsa_of_setup_routing_table() fills 'rtable' with port numbers
of the _target_ switch, but not current one.
This commit removes redundant devicetree parsing and adds needed port
number as a function argument. So dsa_of_setup_routing_table() now just
looks for target switch number by parsing parent of 'link' device node.
To remove possible misunderstandings with the way of determining target
switch number, a corresponding comment was added to the source code and
to the DSA device tree bindings documentation file.
This was tested on a custom board with two Marvell
88E6095 switches with
following corresponding routing tables: { -1, 10 } and { 8, -1 }.
Signed-off-by: Pavel Nakonechny <pavel.nakonechny@skitlab.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Mon, 6 Apr 2015 21:10:08 +0000 (14:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov:
"Updates for the input subsystem - two more tweaks for ALPS driver to
work out kinks after splitting the touchpad, trackstick, and potential
external PS/2 mouse into separate input devices.
Changes to support ALPS SS4 devices (protocol V8) will be coming in
4.1..."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: alps - document stick behavior for protocol V2
Input: alps - report V2 Dualpoint Stick events via the right evdev node
Input: alps - report interleaved bare PS/2 packets via dev3
WANG Cong [Fri, 3 Apr 2015 20:46:09 +0000 (13:46 -0700)]
l2tp: unregister l2tp_net_ops on failure path
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stas Sergeev [Wed, 1 Apr 2015 16:23:29 +0000 (19:23 +0300)]
mvneta: dont call mvneta_adjust_link() manually
mvneta_adjust_link() is a callback for of_phy_connect() and should
not be called directly. The result of calling it directly is as below:
Signed-off-by: David S. Miller <davem@davemloft.net>
hannes@stressinduktion.org [Wed, 1 Apr 2015 15:07:44 +0000 (17:07 +0200)]
ipv6: protect skb->sk accesses from recursive dereference inside the stack
We should not consult skb->sk for output decisions in xmit recursion
levels > 0 in the stack. Otherwise local socket settings could influence
the result of e.g. tunnel encapsulation process.
ipv6 does not conform with this in three places:
1) ip6_fragment: we do consult ipv6_npinfo for frag_size
2) sk_mc_loop in ipv6 uses skb->sk and checks if we should
loop the packet back to the local socket
3) ip6_skb_dst_mtu could query the settings from the user socket and
force a wrong MTU
Furthermore:
In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
PF_PACKET socket ontop of an IPv6-backed vxlan device.
Reuse xmit_recursion as we are currently only interested in protecting
tunnel devices.
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hans de Goede [Sat, 4 Apr 2015 00:30:31 +0000 (17:30 -0700)]
Input: alps - document stick behavior for protocol V2
Document that protocol V2 uses standard (bare) PS/2 mouse packets for the
DualPoint stick.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-By: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hans de Goede [Sat, 4 Apr 2015 00:20:05 +0000 (17:20 -0700)]
Input: alps - report V2 Dualpoint Stick events via the right evdev node
On V2 devices the DualPoint Stick reports bare packets, these should be
reported via the "AlpsPS/2 ALPS DualPoint Stick" dev2 evdev node, which also
has the INPUT_PROP_POINTING_STICK propbit set.
Note that since there is no way to distinguish these packets from an external
PS/2 mouse (insofar as these laptops have an external PS/2 port) this means
that we will be reporting PS/2 mouse events via this evdev node too, as we've
been doing in kernel 3.19 and older.
This has been tested on a Dell Latitude D620 and a Dell Latitude E6400,
which both have a V2 touchpad + a DualPoint Stick which reports bare packets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hans de Goede [Sat, 4 Apr 2015 00:14:40 +0000 (17:14 -0700)]
Input: alps - report interleaved bare PS/2 packets via dev3
Bare packets should be reported via the same evdev device independent on
whether they are detected on the beginning of a packet or in the middle
of a packet.
This has been tested on a Dell Latitude E6400, where the DualPoint Stick
reports bare packets, which get reported via dev3 when the touchpad is
idle, and via dev2 when the touchpad and stick are used simultaneously.
This commit fixes this inconsistency by always reporting bare packets via
dev3. Note that since the come from a DualPoint Stick they really should be
reported via dev2, this gets fixed in a later commit.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Amaury.Bouchra.Pilet@ENS.fr [Sat, 4 Apr 2015 22:58:16 +0000 (00:58 +0200)]
staging: lustre: orthography & coding style
Orthography and coding style corrections.
Signed-off-by: Amaury Bouchra Pilet <Amaury.Bouchra.Pilet@ENS.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 5 Apr 2015 12:06:35 +0000 (14:06 +0200)]
staging: lustre: lnet: lnet: fix error return code
Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tal Shorer [Sun, 5 Apr 2015 10:54:09 +0000 (13:54 +0300)]
staging: lustre: fix sparse warning
Sparse reports:
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1284:6: warning:
symbol 'lustre_kill_super' was not declared. Should it be static?
Fix this warning by making lustre_kill_super static.
It is not used outside this file.
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sat, 4 Apr 2015 19:26:28 +0000 (12:26 -0700)]
Merge tag 'usb-4.0-rc6' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are some small USB fixes and new device ids for 4.0-rc6. Nothing
major, some xhci fixes for reported problems, and some usb-serial
device ids.
All have been in linux-next for a while"
* tag 'usb-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: ftdi_sio: Use jtag quirk for SNAP Connect E10
usb: isp1760: fix spin unlock in the error path of isp1760_udc_start
usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers
usb: xhci: handle Config Error Change (CEC) in xhci driver
USB: keyspan_pda: add new device id
USB: ftdi_sio: Added custom PID for Synapse Wireless product
Linus Torvalds [Sat, 4 Apr 2015 19:22:31 +0000 (12:22 -0700)]
Merge tag 'staging-4.0-rc6' of git://git./linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are some staging driver fixes, well, really all just IIO driver
fixes, for 4.0-rc6. They fix issues that have been reported with
these drivers.
All of these patches have been in linux-next for a while"
* tag 'staging-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
iio: imu: Use iio_trigger_get for indio_dev->trig assignment
iio: adc: vf610: use ADC clock within specification
iio/adc/cc10001_adc.c: Fix !HAS_IOMEM build
iio: core: Fix double free.
iio:inv-mpu6050: Fix inconsistency for the scale channel
staging: iio: dummy: Fix undefined symbol build error
iio: inv_mpu6050: Clear timestamps fifo while resetting hardware fifo
staging: iio: hmc5843: Set iio name property in sysfs
iio: bmc150: change sampling frequency
iio: fix drivers that check buffer->scan_mask
Linus Torvalds [Sat, 4 Apr 2015 19:11:57 +0000 (12:11 -0700)]
Merge tag 'tty-4.0-rc6' of git://git./linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH:
"Here are 3 serial driver fixes for 4.0-rc6. They fix some reported
issues with the samsung and fsl_lpuart drivers.
All have been in linux-next for a while"
* tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
tty: serial: fsl_lpuart: clear receive flag on FIFO flush
tty: serial: fsl_lpuart: specify transmit FIFO size
serial: samsung: Clear operation mode on UART shutdown
Greg Kroah-Hartman [Sat, 4 Apr 2015 10:00:25 +0000 (12:00 +0200)]
Revert "Staging: sm750fb: Fix C99 Comments"
This reverts commit
6ad6b5ed3e2472b399b567a2f036006bf25df467.
It added a file that should not be in the kernel source tree.
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Fri, 3 Apr 2015 21:58:48 +0000 (14:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
"A fix for ALPS driver for issue introduced in the latest update and a
tweak for yet another Lenovo box in Synaptics.
There will be more ALPS tweaks coming.."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: define INPUT_PROP_ACCELEROMETER behavior
Input: synaptics - fix min-max quirk value for E440
Input: synaptics - add quirk for Thinkpad E440
Input: ALPS - fix max coordinates for v5 and v7 protocols
Input: add MT_TOOL_PALM
Linus Torvalds [Fri, 3 Apr 2015 21:49:26 +0000 (14:49 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fix from Jens Axboe:
"Just one patch in this pull request, fixing a regression caused by a
'mathematically correct' change to lcm()"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix blk_stack_limits() regression due to lcm() change
Linus Torvalds [Fri, 3 Apr 2015 17:42:32 +0000 (10:42 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"Misc fixes: a SYSRET single-stepping fix, a dmi-scan robustization
fix, a reboot quirk and a kgdb fixlet"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
kgdb/x86: Fix reporting of 'si' in kgdb on x86_64
x86/asm/entry/64: Disable opportunistic SYSRET if regs->flags has TF set
x86/reboot: Add ASRock Q1900DC-ITX mainboard reboot quirk
MAINTAINERS: Change the x86 microcode loader maintainer
firmware: dmi_scan: Prevent dmi_num integer overflow
Linus Torvalds [Fri, 3 Apr 2015 17:38:36 +0000 (10:38 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"Two x86 Intel PMU constraint handling fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/intel: Fix Haswell CYCLE_ACTIVITY.* counter constraints
perf/x86/intel: Filter branches for PEBS event
Linus Torvalds [Fri, 3 Apr 2015 17:15:19 +0000 (10:15 -0700)]
Merge tag 'devicetree-for-linus' of git://git./linux/kernel/git/glikely/linux
Pull devicetree fix from Grant Likely:
"Simple bugfix for bad device tree data on the PA-Semi platform"
* tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux:
drivers/of: Add empty ranges quirk for PA-Semi
Linus Torvalds [Fri, 3 Apr 2015 16:54:36 +0000 (09:54 -0700)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French:
"A set of small cifs fixes fixing a memory leak, kernel oops, and
infinite loop (and some spotted by Coverity)"
* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
Fix warning
Fix another dereference before null check warning
CIFS: session servername can't be null
Fix warning on impossible comparison
Fix coverity warning
Fix dereference before null check warning
Don't ignore errors on encrypting password in SMBTcon
Fix warning on uninitialized buftype
cifs: potential memory leaks when parsing mnt opts
cifs: fix use-after-free bug in find_writable_file
cifs: smb2_clone_range() - exit on unhandled error
Nicolas Dichtel [Fri, 3 Apr 2015 10:02:37 +0000 (12:02 +0200)]
netns: don't allocate an id for dead netns
First, let's explain the problem.
Suppose you have an ipip interface that stands in the netns foo and its link
part in the netns bar (so the netns bar has an nsid into the netns foo).
Now, you remove the netns bar:
- the bar nsid into the netns foo is removed
- the netns exit method of ipip is called, thus our ipip iface is removed:
=> a netlink message is built in the netns foo to advertise this deletion
=> this netlink message requests an nsid for bar, thus a new nsid is
allocated for bar and never removed.
This patch adds a check in peernet2id() so that an id cannot be allocated for
a netns which is currently destroyed.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Fri, 3 Apr 2015 10:02:36 +0000 (12:02 +0200)]
Revert "netns: don't clear nsid too early on removal"
This reverts
commit
4217291e592d ("netns: don't clear nsid too early on removal").
This is not the right fix, it introduces races.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Tue, 31 Mar 2015 08:58:55 +0000 (11:58 +0300)]
Staging: rtl8192u: use correct array for debug output
This is supposed to be ->rates_ex[] instead of ->rates[]. I found this
because static checkers complain than ->rates is too small so we're
reading beyond the end of the array. It has 12 elements instead of 15.
This bug was apparently copy and pasted from ipw2x00. I fixed it before
in that driver
428e3cf5f98c ('ipw2x00: printing the wrong array in
debug code')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:38 +0000 (00:24 +0200)]
staging: rtl8192e: Remove dead code
Remove commented-out code
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:37 +0000 (00:24 +0200)]
staging: rtl8192e: Comment cleanup (style/format)
- Multiline comments use "network subsystem comment style"
- Merge short multiline comments
- Remove empty comments
- Remove function name comment at the end of small (<1 screen) functions
- Reformat 802.11 data frame format to use spaces and network format
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:36 +0000 (00:24 +0200)]
staging: rtl8192e: Fix indentation in rtllib_rx_auth_resp()
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:35 +0000 (00:24 +0200)]
staging: rtl8192e: Decrease nesting of rtllib_rx_auth_resp()
Return from rtllib_rx_auth_resp() if auth_parse() fails.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:34 +0000 (00:24 +0200)]
staging: rtl8192e: Divide rtllib_rx_auth()
Move authentication response processing to rtllib_rx_auth_resp() function.
No logic is affected.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:33 +0000 (00:24 +0200)]
staging: rtl8192e: Fix PRINTK_WITHOUT_KERN_LEVEL warnings
Replace custom hex dumping function with print_hex_dump_bytes()
to make checkpatch.pl happy
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:32 +0000 (00:24 +0200)]
staging: rtl8192e: Fix DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON warning
Fix 'do {} while (0) macros should not be semicolon terminated'
checkpatch.pl warning
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:31 +0000 (00:24 +0200)]
staging: rtl8192e: Fix BRACES warning
Fix 'braces {} are not necessary for single statement blocks'
checkpatch.pl warning
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:30 +0000 (00:24 +0200)]
staging: rtl8192e: Fix LINE_CONTINUATIONS warning
Fix 'Avoid unnecessary line continuations' checkpatch.pl warning
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:29 +0000 (00:24 +0200)]
staging: rtl8192e: Fix UNNECESSARY_PARENTHESES warnings
Fix 'Unnecessary parentheses' checkpatch.pl warning
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:28 +0000 (00:24 +0200)]
staging: rtl8192e: remove unused EXPORT_SYMBOL_RSL macro
This macro caused checkpatch.pl warning and is not used.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:27 +0000 (00:24 +0200)]
staging: rtl8192e: Fix RETURN_VOID warnings
Fix 'void function return statements are not generally useful'
checkpatch.pl warnings
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 31 Mar 2015 22:24:26 +0000 (00:24 +0200)]
staging: rtl8192e: Fix UNNECESSARY_ELSE warning
Fix checkpatch warnings 'else is not generally useful after a break or return'
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:58 +0000 (21:07 -0400)]
staging: rtl8723au: Remove unneeded comments
This commit removes a number of unneeded comments. Two of the
aforementioned comments were most likely meant to aid with version
control, whereas the remaining two comments relate to (now unused)
local variable names.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:57 +0000 (21:07 -0400)]
staging: rtl8723au: Use __func__ in trace logs
Rework the trace log-related lines in rtl8723au's rtw_security.c
to use the __func__ GCC magic variable instead of hardcoding the
function names into the trace log strings. This also corrects a
copy-paste-related typo in the function named rtw_tkip_decrypt23a.
Thanks to Jes Sorensen for the suggestion to use __func__.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:56 +0000 (21:07 -0400)]
staging: rtl8723au: Rework two byte array comparisons
Prior to this commit, rtl8723au's rtw_security.c had two instances of
byte array comparisons (for CRC checks) where the individual elements
of the byte arrays were compared one by one and an error trace would
be output if the byte arrays were determined to be different.
This commit improves the readability of the CRC verification by
placing the individual 4 bytes of each byte array into an 32-bit
unsigned integer and comparing the two resulting integers.
Thanks to Larry Finger for spotting the code style issues in the
previous version of this commit, and thanks to Joe Perches for
suggesting the use of 32-bit integer comparisons instead of byte
array comparisons.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:55 +0000 (21:07 -0400)]
staging: rtl8723au: suspect code indent for conditional statements
Correct a number of indentation-with-spaces-and-tabs issues in
rtl8723au's rtw_security.c, according to checkpatch.pl:
WARNING: suspect code indent for conditional statements
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:54 +0000 (21:07 -0400)]
staging: rtl8723au: Adjust whitespace in and around comments
As the subject indicates, adjust whitespace in and around comments
in rtl8723au's rtw_security.c.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:53 +0000 (21:07 -0400)]
staging: rtl8723au: No spaces at the start of a line
Prior to this commit, a large block of constants used to represent
an AES S-box table were indented with spaces in rtl8723au's
rtw_security.c. Correct the checkpatch.pl warnings indicating that
spaces should not be used to indent lines:
WARNING: please, no spaces at the start of a line
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:52 +0000 (21:07 -0400)]
staging: rtl8723au: that open brace should be on the previous line
Correct two instances of the checkpatch.pl error indicating that the
opening curly braces should not be on new lines:
ERROR: that open brace { should be on the previous line
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:51 +0000 (21:07 -0400)]
staging: rtl8723au: trailing statements should be on next line
Correct a number of checkpatch.pl errors in rtl8723au's rtw_security.c
related to trailing statements:
ERROR: trailing statements should be on next line
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:50 +0000 (21:07 -0400)]
staging: rtl8723au: Remove unneeded curly braces
Correct a number of checkpatch.pl warnings in rtl8723au's rtw_security.c
related to the existence of unnecessary curly braces around single
statement blocks:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:49 +0000 (21:07 -0400)]
staging: rtl8723au: else is not generally useful after a return
Correct a checkpatch.pl warning regarding rtl8723au's
rtw_security.c::crc32_init pointing out that having an else statement
after a break or a return is not useful.
drivers/staging/rtl8723au/core/rtw_security.c:105:
WARNING: else is not generally useful after a break or return
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:48 +0000 (21:07 -0400)]
staging: rtl8723au: Reorganize a few functions to remove indentation
Prior to this commit, functions rtw_tkip_encrypt23a and rtw_tkip_decrypt23a had
large if blocks which contained the majority of the logic in the functions.
Rework these functions so that if the negated version of the aforementioned if
blocks' conditions are true, we return from the function with _FAIL, as
expected by the calling code.
This lets us remove two levels of indentation from the functions in
question, making them more readable.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:47 +0000 (21:07 -0400)]
staging: rtl8723au: Fix the indentation of two lines
Correct the indentation of two lines in rtw_tkip_encrypt23a function in
rtl8723au's rtw_security.c.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:46 +0000 (21:07 -0400)]
staging: rtl8723au: else should follow close brace
Correct checkpatch.pl errors in rtl8723au's rtw_security.c indicating
that an else statement should follow the closing brace of the previous
if/else if code block:
ERROR: else should follow close brace '}'
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:45 +0000 (21:07 -0400)]
staging: rtl8723au: Fix "before/around/after" whitespace issues
Correct a number of "space(s) required before/around/after" checkpatch.pl
issues in a number of functions in rtl8723au's rtw_security.c.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M. Vefa Bicakci [Sun, 29 Mar 2015 01:07:44 +0000 (21:07 -0400)]
staging: rtl8723au: Reformat whitespace to increase readability
Adjust the whitespace in the signature, local variable declaration and
initialization parts of a number of functions to increase readability
in rtl8723au's rtw_security.c.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 29 Mar 2015 12:54:12 +0000 (14:54 +0200)]
staging: rtl8712: Drop unneeded cast on netdev_priv
The result of netdev_priv is already implicitly cast to the type of the
left side of the assignment.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T *x;
@@
x =
- (T *)
netdev_priv(...)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phong Tran [Thu, 2 Apr 2015 14:36:05 +0000 (21:36 +0700)]
staging: android: ion_test: Add the MODULE_LICENSE macro
Base on the file comment should define GPL v2 for ion test driver
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 1 Apr 2015 21:32:52 +0000 (22:32 +0100)]
staging: vt6655: use ieee80211_tx_info to select packet type.
Information for packet type is in ieee80211_tx_info
band IEEE80211_BAND_5GHZ for PK_TYPE_11A.
IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB
This ensures that the packet is always the right type.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 1 Apr 2015 21:32:51 +0000 (22:32 +0100)]
staging: vt6655: s_vGenerateTxParameter Replace PSTxBufHead with struct vnt_tx_fifo_head
With endian correction on fifo_ctl and current_rate.
Removing pTxBufHead, pFifoHead and wFifoCtl
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Piotr Witoslawski [Thu, 2 Apr 2015 13:37:30 +0000 (15:37 +0200)]
drivers: staging: rtl8723au: fix "warning: cast to restricted __le16"
This patch fixes the sparse warning: "cast to restricted __le16" reported
for rtl8723au/hal/rtl8723au_xmit.c
Signed-off-by: Piotr Witoslawski <pwitos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 29 Mar 2015 12:54:14 +0000 (14:54 +0200)]
staging: ft1000: Drop unneeded cast on netdev_priv
The result of netdev_priv is already implicitly cast to the type of the
left side of the assignment.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T *x;
@@
x =
- (T *)
netdev_priv(...)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sat, 28 Mar 2015 19:46:29 +0000 (21:46 +0200)]
staging: octeon-ethernet: delete cvm_oct_set_carrier()
Delete unused function cvm_oct_set_carrier().
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sat, 28 Mar 2015 19:24:34 +0000 (21:24 +0200)]
staging: octeon-usb: make CVMX_WAIT_FOR_FIELD32 to take condition expression
Make CVMX_WAIT_FOR_FIELD32 to take full condition expression.
This should make the usage simpler, and the macro more readable.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>