Commit graph

589976 commits

Author SHA1 Message Date
Matt Ranostay
94bef000f1 iio: hudmidity: hdc100x: fix incorrect shifting and scaling
Shifting sensor data to the right 2 bits was incorrect and caused the
scaling values + offsets to be invalid.

Reported-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Tested-by: Alison Schofield <amsfield22@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-06-03 13:25:33 +01:00
Yong Li
590b92a302 iio: light apds9960: Add the missing dev.parent
Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039
Some userspace tools use this path to identify a specific instance of the
device.

Signed-off-by: Yong Li <sdliyong@gmail.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-06-03 12:54:51 +01:00
Crestez Dan Leonard
9954382335 iio: Fix error handling in iio_trigger_attach_poll_func
When attaching a pollfunc iio_trigger_attach_poll_func will allocate a
virtual irq and call the driver's set_trigger_state function. Fix error
handling to undo previous steps if any fails.

In particular this fixes handling errors from a driver's
set_trigger_state function. When using triggered buffers a failure to
enable the trigger used to make the buffer unusable.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-06-03 12:54:46 +01:00
Crestez Dan Leonard
9914760615 iio: st_sensors: Disable DRDY at init time
This fixes odd behavior after reboot.

The fact that we set the device to powerdown mode is not sufficient to
prevent DRDY being active because we might still have an unread sample.

Even if powerdown was sufficient keeping DRDY disabled while trigger is
not active is a good idea.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:27:16 +01:00
Crestez Dan Leonard
ff05916f94 iio: st_sensors: Init trigger before irq request
This fixes a possible race where an interrupt arrives before complete
initialization and crashes because iio_trigger_get_drvdata returns NULL.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:25:27 +01:00
Linus Walleij
65925b65ed iio: st_sensors: switch to a threaded interrupt
commit 98ad8b41f58dff6b30713d7f09ae3834b8df7ded
("iio: st_sensors: verify interrupt event to status") caused
a regression when reading ST sensors from a HRTimer trigger
rather than the intrinsic interrupts: the HRTimer may
trigger faster than the sensor provides new values, and
as the check against new values available as a cause of
the interrupt trigger was done in the poll function,
this would bail out of the HRTimer interrupt with
IRQ_NONE.

So clearly we need to only check the new values available
from the proper interrupt handler and not from the poll
function, which should rather just read the raw values
from the registers, put them into the buffer and be happy.

To achieve this: switch the ST Sensors over to using a true
threaded interrupt handler.

In the interrupt thread, check if new values are available,
else yield to the (potential) next device on the same
interrupt line to check the registers. If the interrupt
was ours, proceed to poll the values.

Instead of relying on iio_trigger_generic_data_rdy_poll() as
a top half to wake up the thread that polls the sensor for
new data, have the thread call iio_trigger_poll_chained()
after determining that is is the proper source of the
interrupt. This is modelled on drivers/iio/accel/mma8452.c
which is already using a properly threaded interrupt handler.

In order to get the same precision in timestamps as
previously, where samples would be timestamped in the
poll function pf->timestamp when calling
iio_trigger_generic_data_rdy_poll() we introduce a
local timestamp in the sensor data, set it in the top half
(fastpath) of the interrupt handler and provide that to the
core when calling iio_push_to_buffers_with_timestamp().

Additionally: if the active scanmask is not set for the
sensor no IRQs should be enabled and we need to bail out
with IRQ_NONE. This can happen if spurious IRQs fire when
installing the threaded interrupt handler.

Tested with hard interrupt triggers on LIS331DL, then also
tested with hrtimers on the same sensor by creating a 75Hz
HRTimer and using it to poll the sensor.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Reported-by: Crestez Dan Leonard <cdleonard@gmail.com>
Tested-by: Crestez Dan Leonard <cdleonard@gmail.com>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Fixes: 97865fe413 ("iio: st_sensors: verify interrupt event to status")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:21:41 +01:00
Linus Walleij
0dd09ca419 iio: light: bh1780: assign a static name
Using the struct i2c_device->id field for naming the light sensor
is a bad idea: when booting from the pure device tree this is NULL
and that causes the device not to have the "name" property in
sysfs and that in turn confuses the "lsiio" command to stop listing
devices.

So instead of using the device .id, use the hard string "bh1780",
which works just fine.

Fixes: 1f0477f183 ("iio: light: new driver for the ROHM BH1780")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 19:51:29 +01:00
Linus Walleij
13c27e946d iio: bh1780: dereference the client properly
The code in runtime_[suspend|resume] was assuming that the
i2c client data was the bh1780 state container, but it contains
the IIO device. So first dereference the IIO device from the
i2c client, then get the state container using the iio_priv()
call.

Fixes: 1f0477f183 ("iio: light: new driver for the ROHM BH1780")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 19:50:56 +01:00
Matt Ranostay
09bc0ddaab iio: humidity: hdc100x: fix IIO_TEMP channel reporting
IIO_TEMP channel was being incorrectly reported back as Celsius when it
should have been milliCelsius. This is via an incorrect scale value being
returned to userspace.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 19:45:54 +01:00
Gregor Boirie
d43a41152f iio:st_pressure: fix sampling gains (bring inline with ABI)
Temperature channels report scaled samples in Celsius although expected as
milli degree Celsius in Documentation/ABI/testing/sysfs-bus-iio.
Gains are not implemented at all for LPS001WP pressure and temperature
channels.

This patch ensures that proper offsets and scales are exposed to userpace
for both pressure and temperature channels.
Also fix a NULL pointer exception when userspace reads content of sysfs
scale attribute when gains are not defined.

Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 15:48:54 +01:00
Matt Ranostay
37b1ba2c68 iio: proximity: as3935: fix buffer stack trashing
Buffer wasn't of a valid size to allow the timestamp, and correct padding.
This patchset also moves the buffer off the stack, and onto the heap.

Cc: george.mccollister@gmail.com
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-22 20:54:15 +01:00
Matt Ranostay
7d0643634e iio: proximity: as3935: remove triggered buffer processing
Triggered buffers shouldn't return processed data, and the respective
conversion was overflowing the defined .realbits for the channel.

Cc: george.mccollister@gmail.com
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-22 20:53:53 +01:00
Matt Ranostay
5138806f16 iio: proximity: as3935: correct IIO_CHAN_INFO_RAW output
IIO_CHAN_INFO_RAW was returning processed data which was incorrect.
This also adds the IIO_CHAN_INFO_SCALE value to convert to a processed value.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-22 20:53:36 +01:00
Crestez Dan Leonard
14f2461b82 max44000: Remove scale from proximity
This is not implemented and doesn't really make sense because IIO
proximity is unit-less.

Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale
sysfs entry won't appear. This fixes userspace tools like generic_buffer
which abort when reads returns an error.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-21 20:21:17 +01:00
Dan Carpenter
1cb0d06a00 iio: humidity: am2315: Remove a stray unlock
We haven't taken the lock yet so we don't need to unlock here.

Fixes: 0d96d5ead3 ('iio: humidity: Add triggered buffer support for AM2315')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-21 17:47:14 +01:00
Alison Schofield
0e35cf5ce0 iio: humidity: hdc100x: correct humidity integration time mask
Apply the correct mask to enable all available humidity integration
times.  Currently, the driver defaults to 6500 and all is okay with that.
However, if 3850 is selected we get a stuck bit and can't change back
to 6500 or select 2500.  (Verified with HDC1008)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-21 17:23:32 +01:00
Akinobu Mita
a3e5afe491 iio: pressure: bmp280: fix error message for wrong chip id
The bmp280 driver also supports BMP180 which has a different chip id
with BMP280.  The probe routine verifies that the device reports the
correct chip id but the error message is confusing as if BMP280's chip
id is always expected.

Reported-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Matt Ranostay <mranostay@gmail.com>
Cc: Vlad Dogaru <vlad.dogaru@intel.com>
Cc: Christoph Mair <christoph.mair@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-14 19:02:01 +01:00
Linus Walleij
53dfc3b9e6 iio: light: bh1780: return after write
When writing a value using direct reg access from debugfs
we need to return and not fall through to reading the
value, lest we'll dereference a NULL pointer.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-04 10:53:51 +01:00
Dan Carpenter
04bf02175f iio: dac: ad5592r: Off by one bug in ad5592r_alloc_channels()
The > here should be >= or we go beyond the end for the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-04 10:52:43 +01:00
Daniel Baluta
c25d3f37be iio: bmi160: Fix ODR setting
mask and val parameters of regmap_update_bits were reveresed.

Fixes: 77c4ad2d6a ("iio: imu: Add initial support for Bosch BMI160")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-04 10:50:36 +01:00
Daniel Baluta
5ec97ba071 iio: bmi160: Fix output data rate for accel
Format is INT_PLUS_MICRO and micro odr part of ODR should
be parts of a micro.

Also s/8000/800 this is obviously a typo.

Fixes: 77c4ad2d6a ("iio: imu: Add initial support for Bosch BMI160")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-04 10:49:00 +01:00
H Hartley Sweeten
5c69585837 staging: comedi: mite: tidy up module init/exit
Move the module_init()/module_exit() so they are in the prefered spot
on the line after the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
b21f1fc84c staging: comedi: mite: document the remaining exported functions
For aesthetics, add docbook comments for the exported functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
f5f4f0c7c8 staging: comedi: mite: move the mite dma arm/disarm/reset functions
For aesthetics, move these functions to a more logical spot in the
code and add docbook comments for the exported functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
71f53ea4ba staging: comedi: mite: move mite_prep_dma()
For aesthetics, move this functions to a more logical spot in the
code and add a docbook comment for the exported function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
c3c860b395 staging: comedi: mite: tidy up mite dma channel request/release
For aesthetics, make the actual "request" function static and change
mite_request_channel_in_range() into a wrapper that calls the internal
function. Change the inline function that requests any free channel
into an export that also calls the internal function.

Move the functions to a more logical spot in the code and add docbook
comments for the exported functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
fc53242394 staging: comedi: mite: move the mite ring functions
For aesthetics, move the functions that allocate/free and initialize
the mite dma ring. They are currently kind of scattered around the
code.

Add docbook comments for the exported functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
a2163cc35a staging: comedi: mite: tidy up kernel messages in mite_steup()
The dev_err() messages with pci_ioremap_bar() fails are just noise.
Remove them.

The 'use_win1' and 'fifo_size' dev_info() messages are also noise
but they may be useful when debugging. Change them to dev_dbg().

Absorb dump_chip_signnature() and change the pr_info() messages
to dev_dbg(). These also might be useful when debugging.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
48f2c1aecf staging: comedi: mite: do mite_steup() as part of mite_attach()
Currently all the drivers that use the mite driver have to call
mite_setup() after allocating and initializing the mite device
with mite_attach().

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

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
5b329305d2 staging: comedi: mite: document mite_alloc()/mite_detach()
These functions are basically the comedi_driver (*attach)/(*detach)
for this driver.

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

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

Add some docbook comments for these exported functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
0bdb1288fa staging: comedi: mite: use prefered form for passing a struct size
Add a local variable to mite_buf_change() so that the prefered
form of passing a struct size, sizeof(*p), can be used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
9ec148da5f staging: comedi: mite: introduce mite_free_dma_descs()
Introduce a helper function to handle the dma_free_coherent() of
the mite dma descriptors.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
48a73aedd7 staging: comedi: mite: remove mite member 'channel_allocated'
An allocated mite_channel will have its 'ring' member initialized
to point to the mite_ring that will be used for DMA. A non-allocated
mite_channel will have a 'ring' member set to NULL, either by a
channel release or due to the initial kzalloc of the 'mite' struct.

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
ab55b5c9f2 staging: comedi: mite: rename mite member 'mite_io_addr'
Rename this member of struct mite to 'mmio' to help shorten the long lines.

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
3303410d04 staging: comedi: mite: tidy up mite_init_ring_descriptors()
Use a local variable for the mite_dma_desc pointer to help clarify
this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
b0af848ca3 staging: comedi: mite: rename mite_ring member 'descriptors'
Rename this member of struct mite_ring to 'descs' to help shorten the
long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
a8b559275e staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'
Rename this member of struct mite_ring to 'dma_addr' to help shorten the
long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
19d9212ef9 staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'
Rename this name to 'mite_ring' to help shorten the long lines.

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
f5d077cd20 staging: comedi: mite: rename 'struct mite_dma_descriptor'
Rename this struct to 'mite_dma_desc' to help shorten the long lines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
H Hartley Sweeten
1a8da31b6c staging: comedi: mite: rename 'struct mite_struct'
Rename this struct to simply 'mite'. The current name is a bit redundant.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:11:15 -07:00
Manu Kumar
43bb50ec36 staging: skein: cleanup: align code to parentheses
Align wrapped lines to parentheses (if applicable).

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:07:11 -07:00
Manu Kumar
e602a80822 staging: skein: cleanup: removed unnecessary cast spaces
Spaces after casts are removed

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:07:11 -07:00
Manu Kumar
5b05c1e243 staging: skein: cleanup: Fixed operator whitespace
added operator white space and parentheses for readability

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:07:11 -07:00
Manu Kumar
a28e32e061 staging: skein: cleanup: fixed new lines
Added lines between functions in skein_block.c and removed unneeded
lines in skein_block.c

Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:07:11 -07:00
Chaehyun Lim
beba2ab84e staging: wilc1000: rename result in handle_get_mac_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Chaehyun Lim
098bd3fd06 staging: wilc1000: change data type of result in handle_get_mac_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Chaehyun Lim
93dc5d5583 staging: wilc1000: change handle_get_mac_address's return type to void
When handle_get_mac_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Chaehyun Lim
abfaf5fcd8 staging: wilc1000: fix comparison style of if statement in handle_get_ip_address
This patch changes conditional comparison of if statement as if (ret)
instead of using if (ret != 0)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Chaehyun Lim
6f2f5d5ec1 staging: wilc1000: rename result in handle_get_ip_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Chaehyun Lim
cdc339a29f staging: wilc1000: change data type of result in handle_get_ip_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00