Matt Ranostay [Mon, 30 May 2016 02:52:02 +0000 (19:52 -0700)]
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>
Yong Li [Thu, 5 May 2016 08:10:49 +0000 (16:10 +0800)]
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>
Crestez Dan Leonard [Tue, 3 May 2016 12:27:09 +0000 (15:27 +0300)]
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>
Crestez Dan Leonard [Fri, 13 May 2016 18:43:34 +0000 (21:43 +0300)]
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>
Crestez Dan Leonard [Fri, 13 May 2016 18:43:33 +0000 (21:43 +0300)]
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>
Linus Walleij [Sat, 21 May 2016 18:43:16 +0000 (20:43 +0200)]
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:
97865fe41322 ("iio: st_sensors: verify interrupt event to status")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Linus Walleij [Wed, 25 May 2016 07:40:27 +0000 (09:40 +0200)]
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:
1f0477f18306 ("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>
Linus Walleij [Wed, 25 May 2016 07:40:26 +0000 (09:40 +0200)]
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:
1f0477f18306 ("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>
Matt Ranostay [Fri, 27 May 2016 02:55:06 +0000 (19:55 -0700)]
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>
Gregor Boirie [Tue, 19 Apr 2016 09:18:33 +0000 (11:18 +0200)]
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>
Matt Ranostay [Sun, 22 May 2016 03:01:03 +0000 (20:01 -0700)]
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>
Matt Ranostay [Sun, 22 May 2016 03:01:02 +0000 (20:01 -0700)]
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>
Matt Ranostay [Sun, 22 May 2016 03:01:01 +0000 (20:01 -0700)]
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>
Crestez Dan Leonard [Fri, 20 May 2016 14:44:36 +0000 (17:44 +0300)]
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>
Dan Carpenter [Tue, 17 May 2016 08:02:56 +0000 (11:02 +0300)]
iio: humidity: am2315: Remove a stray unlock
We haven't taken the lock yet so we don't need to unlock here.
Fixes:
0d96d5ead3f7 ('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>
Alison Schofield [Fri, 20 May 2016 17:06:41 +0000 (10:06 -0700)]
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>
Akinobu Mita [Thu, 28 Apr 2016 14:39:53 +0000 (23:39 +0900)]
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>
Linus Walleij [Thu, 28 Apr 2016 12:02:41 +0000 (14:02 +0200)]
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>
Dan Carpenter [Fri, 29 Apr 2016 09:03:31 +0000 (12:03 +0300)]
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>
Daniel Baluta [Fri, 29 Apr 2016 11:42:34 +0000 (14:42 +0300)]
iio: bmi160: Fix ODR setting
mask and val parameters of regmap_update_bits were reveresed.
Fixes:
77c4ad2d6a9 ("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>
Daniel Baluta [Fri, 29 Apr 2016 11:42:33 +0000 (14:42 +0300)]
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:
77c4ad2d6a9 ("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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:52 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:51 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:50 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:49 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:48 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:47 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:46 +0000 (10:11 -0700)]
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>
H Hartley Sweeten [Mon, 2 May 2016 17:11:45 +0000 (10:11 -0700)]
staging: comedi: mite: do mite_steup() as part of mite_attach()
Currently all the drivers that use the mite driver have to call
mite_setup() after allocating and initializing the mite device
with mite_attach().
Move the mite_setup() call into mite_attach() to simplify the
drivers a bit and remove the need for the additional inline and
exported functions.
For aesthetics, move mite_setup2(), and rename it to mite_setup(),
so it's near mite_attach().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:44 +0000 (10:11 -0700)]
staging: comedi: mite: document mite_alloc()/mite_detach()
These functions are basically the comedi_driver (*attach)/(*detach)
for this driver.
For aesthetics, rename mite_alloc() to mite_attach() and pass the
comedi_device pointer to it instead of the pci_dev pointer.
Move the functions to the end of the file. This is typically where
a comedi_drivers (*attach)/(*detach) are located.
Add some docbook comments for these exported functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:43 +0000 (10:11 -0700)]
staging: comedi: mite: use prefered form for passing a struct size
Add a local variable to mite_buf_change() so that the prefered
form of passing a struct size, sizeof(*p), can be used.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:42 +0000 (10:11 -0700)]
staging: comedi: mite: introduce mite_free_dma_descs()
Introduce a helper function to handle the dma_free_coherent() of
the mite dma descriptors.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:41 +0000 (10:11 -0700)]
staging: comedi: mite: remove mite member 'channel_allocated'
An allocated mite_channel will have its 'ring' member initialized
to point to the mite_ring that will be used for DMA. A non-allocated
mite_channel will have a 'ring' member set to NULL, either by a
channel release or due to the initial kzalloc of the 'mite' struct.
Refactor the code to use the mite_chan->ring to detect in a channel
is allocated and remove the unnecessary member.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:40 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite member 'mite_io_addr'
Rename this member of struct mite to 'mmio' to help shorten the long lines.
Add a local variable for the mite pointer in the ni_pcimio driver
to clarify and shorten the long lines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:39 +0000 (10:11 -0700)]
staging: comedi: mite: tidy up mite_init_ring_descriptors()
Use a local variable for the mite_dma_desc pointer to help clarify
this function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:38 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite_ring member 'descriptors'
Rename this member of struct mite_ring to 'descs' to help shorten the
long lines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:37 +0000 (10:11 -0700)]
staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'
Rename this member of struct mite_ring to 'dma_addr' to help shorten the
long lines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:36 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'
Rename this name to 'mite_ring' to help shorten the long lines.
In the ni_660x driver, also shorten the private data member 'mite_rings'
to simply 'ring'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:35 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_dma_descriptor'
Rename this struct to 'mite_dma_desc' to help shorten the long lines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 2 May 2016 17:11:34 +0000 (10:11 -0700)]
staging: comedi: mite: rename 'struct mite_struct'
Rename this struct to simply 'mite'. The current name is a bit redundant.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Sun, 1 May 2016 23:38:35 +0000 (16:38 -0700)]
staging: skein: cleanup: align code to parentheses
Align wrapped lines to parentheses (if applicable).
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Sun, 1 May 2016 23:38:34 +0000 (16:38 -0700)]
staging: skein: cleanup: removed unnecessary cast spaces
Spaces after casts are removed
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Sun, 1 May 2016 23:38:33 +0000 (16:38 -0700)]
staging: skein: cleanup: Fixed operator whitespace
added operator white space and parentheses for readability
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Sun, 1 May 2016 23:38:32 +0000 (16:38 -0700)]
staging: skein: cleanup: fixed new lines
Added lines between functions in skein_block.c and removed unneeded
lines in skein_block.c
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:55 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_mac_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:54 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_mac_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:53 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_mac_address's return type to void
When handle_get_mac_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:52 +0000 (19:47 +0900)]
staging: wilc1000: fix comparison style of if statement in handle_get_ip_address
This patch changes conditional comparison of if statement as if (ret)
instead of using if (ret != 0)
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:51 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_ip_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:50 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_ip_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 May 2016 10:47:49 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_ip_address's return type to void
When handle_get_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:39 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)
Fix coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:37 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous spaces
Fix coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:36 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous parentheses
Fix coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:35 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed extraneous indentation
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:34 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed unnecessary else branch
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:33 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed brace style
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:32 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed newlines style
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:31 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed block comments style
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:30 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: fixed typo
Fixed typo
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacky Boen [Sun, 1 May 2016 15:50:29 +0000 (23:50 +0800)]
Staging: drivers: rtl8188eu: move constants to the right in comparisons
Fixed coding style issue
Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:05 +0000 (22:33 +0100)]
staging: i4l: act2000: remove extra space
It is not kernel coding style to give an extra space after a cast.
We get warned about it by checkpatch.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:04 +0000 (22:33 +0100)]
staging: i4l: act2000: remove blank line after brace
checkpatch complains about an extra blank line after an opening brace.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:03 +0000 (22:33 +0100)]
staging: i4l: act2000: do not assign in if
It is not the kernel coding style to assign values to some variable in
if statement. Split them up into different statements.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Sat, 30 Apr 2016 21:33:02 +0000 (22:33 +0100)]
staging: i4l: act2000: fix use of return
checkpatch warns that return is not a function and as such the brace
after it is not required.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Parth Sane [Mon, 25 Apr 2016 15:43:18 +0000 (21:13 +0530)]
rtl8712: Fixed alignment to match open parenthesis
Fixed alignment to match open parenthesis.
Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:50:48 +0000 (11:50 -0500)]
MAINTAINERS: fsl-mc: Add second maintainer
Add Stuart Yoder as additional maintainer of fsl-mc bus driver.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Brugger [Thu, 14 Apr 2016 21:24:26 +0000 (23:24 +0200)]
staging: fsl-mc: bus: Drop warning
When updating the irq_chip and msi_domain_ops, the code checkes for
already present functions.
When more then one ITS controller are present in the system,
irq_chip and msi_domain_ops got already set and a warning is invoked.
This patch deletes the warning, as the funtions are just already set to
the needed callbacks.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Horia Geantă [Mon, 11 Apr 2016 16:56:16 +0000 (11:56 -0500)]
staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures
There are some error paths that allow for a NULL new_mc_io and err = 0
return code. Return -EINVAL instead.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Itai Katz [Mon, 11 Apr 2016 16:56:11 +0000 (11:56 -0500)]
staging: fsl-mc: add dpmcp version check
The dpmcp driver supports dpmcp version 3.0 and above.
This patch adds the code to check the version.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 6 +++---
drivers/staging/fsl-mc/bus/mc-allocator.c | 11 +++++++++++
2 files changed, 14 insertions(+), 3 deletions(-)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Horia Geanta [Mon, 11 Apr 2016 16:50:26 +0000 (11:50 -0500)]
staging: fsl-mc: add quirk handling for dpseci objects < 4.0
dpseci objects < 4.0 are not coherent-- in spite of the fact
that the MC reports them to be coherent in certain versions.
Add a special case to set the no shareability flag for dpseci
objects < 4.0.
Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
(Stuart: reworded commit message, updated comment in patch)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Itai Katz [Mon, 11 Apr 2016 16:56:05 +0000 (11:56 -0500)]
staging: fsl-mc: add dprc version check
The dprc driver supports dprc version 5.0 and above.
This patch adds the code to check the version.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: resolved merge conflicts, split dpseci quirk into separate patch)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Itai Katz [Mon, 11 Apr 2016 16:55:55 +0000 (11:55 -0500)]
staging: fsl-mc: get version of root dprc from MC hardware
The root dprc is discovered as a platform device in the device tree. The
version of that dprc was previously set using hardcoded values from the API
header in the kernel). This patch removes the use of the hardcoded version
numbers and instead reads the actual dprc version from the hardware.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: resolved merge conflict, updated commit subject/log)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Itai Katz [Mon, 11 Apr 2016 16:55:48 +0000 (11:55 -0500)]
staging: fsl-mc: set cacheable flag for added devices if applicable
Some DPAA2 devices have mmio regions that should be mapped as
cacheable by drivers. Set IORESOURCE_CACHEABLE in the region's
flags if applicable.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
[Stuart: update subject and commit message]
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:49:13 +0000 (11:49 -0500)]
staging: fsl-mc: set up coherent dma ops for added devices
Unless discovered devices have the no shareability flag set,
set up coherent dma ops for them.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Itai Katz [Mon, 11 Apr 2016 16:55:40 +0000 (11:55 -0500)]
staging: fsl-mc: don't use object versions to make binding decisions
Up until now if the object version expected by a driver (in the API header
file) did not match the actual object version in the MC hardware the bus
driver refused to bind the object to the driver or printed out WARN_ON
dumps.
This patch removes those checks, and the responsibility of object version
checking should now be done in the object drivers themselves. If the actual
version discovered is not supported, the driver's probe function should fail.
Drivers should use version checks to support new features and provide
backwards compatibility if at all possible.
This patch also removes the checks that caused bus driver probing to fail
if the overall MC version discovered did not match the firmware version
from the API header...this was too strict. The overall MC version is
informational like a release number, and continues to be printed in the
boot log.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: reworded commit log)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:48:59 +0000 (11:48 -0500)]
staging: fsl-mc: update dprc binary interface to v5.1
The meaning of the "status" parameter in dprc_get_irq_status
has changed, and this patch updates the flib and caller
of the API.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:48:54 +0000 (11:48 -0500)]
staging: fsl-mc: update dpbp binary interface to v2.2
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:48:48 +0000 (11:48 -0500)]
staging: fsl-mc: update dpmcp binary interface to v3.0
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:48:42 +0000 (11:48 -0500)]
staging: fsl-mc: DPAA2 overview readme update
incorporated feedback from review comments, other misc cleanup/tweaks
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 11 Apr 2016 16:48:37 +0000 (11:48 -0500)]
staging: fsl-mc: TODO updates
remove 3 of the remaining TODO items:
-multiple root fsl-mc buses-- done in patch series starting with
commit
14f928054a05 ("staging: fsl-mc: abstract test for existence
of fsl-mc bus")
-interrupt support-- done in patch series starting with
commit
9b1b282ccd81 ("irqdomain: Added domain bus token
DOMAIN_BUS_FSL_MC_MSI")
-MC command serialization-- done in commit
63f2be5c3b358 ("staging:
fsl-mc: Added serialization to mc_send_command()")
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nikita Eshkeev [Mon, 25 Apr 2016 23:15:09 +0000 (02:15 +0300)]
staging: board: line over 80 characters
This patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters
+ .domain = "/system-controller@
e6180000/pm-domains/c5/a4lc@1"
Signed-off-by: Nikita Eshkeev <kastolom@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
han tai [Wed, 20 Apr 2016 07:23:03 +0000 (07:23 +0000)]
staging: vt6656: Add space to align functions
Issue found by checkpatch.pl
CHECK: Alignment should match open parenthesis
Signed-off-by: han tai <hantai1248@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clifton Barnes [Tue, 5 Apr 2016 21:37:38 +0000 (17:37 -0400)]
staging: slicoss: fix missing blank line
fix checkpatch.pl warning about 'Missing a blank line after
declarations'
Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clifton Barnes [Tue, 5 Apr 2016 21:37:37 +0000 (17:37 -0400)]
staging: slicoss: fix bare use of 'unsigned'
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''
Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manav Batra [Thu, 7 Apr 2016 03:22:52 +0000 (20:22 -0700)]
staging: rts5208: alignment to match open paranthesis
Fixes CHECK: Alignment should match open parenthesis
Signed-off-by: Manav Batra <batmanav10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Sim [Tue, 5 Apr 2016 16:47:35 +0000 (17:47 +0100)]
staging: rts5208: ensure braces on all arms of if stmt
Added braces on if arm of if statement where else arm already needs
braces as suggested for clarity in Documentation/CodingStyle (several)
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Fri, 8 Apr 2016 13:02:35 +0000 (16:02 +0300)]
staging: lowmemorykiller: remove bogus NULL check
The NULL checking here doesn't make sense, so it causes a static checker
warning. It turns out that p->mm can't be NULL so the inconsistency is
harmless and we should just remove the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cihangir Akturk [Sat, 9 Apr 2016 18:45:18 +0000 (21:45 +0300)]
staging: fsl-mc: get rid of mutex_locked variables
Remove mutex_locked variables which are used to determine whether mutex is
locked, instead add another label to unlock mutex on premature exits due to
an error.
This patch also addresses the folowing warnings reported by coccinelle:
drivers/staging/fsl-mc/bus/mc-allocator.c:237:1-7: preceding lock on line 204
drivers/staging/fsl-mc/bus/mc-allocator.c:89:1-7: preceding lock on line 57
drivers/staging/fsl-mc/bus/mc-allocator.c:157:1-7: preceding lock on line 124
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Hutchings [Wed, 20 Apr 2016 23:19:25 +0000 (00:19 +0100)]
staging: rtl8192u: Fix crash due to pointers being "confusing"
There's no net_device stashed in skb->cb, there's a net_device * there.
To make it *really* clear, also change the write of the dev pointer
into skb->cb from a memcpy() to an assignment.
Fixes:
3fe563249374 ("staging: rtl8192u: r8192U_core.c: Cleaning up ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Sim [Tue, 5 Apr 2016 16:21:32 +0000 (17:21 +0100)]
staging: rtl8192u: rewrite NULL comparison for pointers
When testing pointers, it is not necessary to explicitly compare to
NULL. Rewrite if condition as (!ptr) or (ptr) as suggested in
Documentation/CodingStyle
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Sim [Tue, 5 Apr 2016 16:13:34 +0000 (17:13 +0100)]
staging: rtl8192u: add blank line after declarations
Add a blank line after function/struct/union/enum declarations for
readability, as suggested in Documentation/CodingStyle
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Sim [Tue, 5 Apr 2016 16:07:47 +0000 (17:07 +0100)]
staging: rtl8192u: remove blank lines after braces (opening)
Remove unneeded blank lines appearing after opening braces as suggested
by checkpatch.pl
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Sim [Tue, 5 Apr 2016 15:59:58 +0000 (16:59 +0100)]
staging: rtl8192u: remove blank lines before braces (closing)
Remove unneeded blank lines occuring before closing braces
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Geliang Tang [Tue, 5 Apr 2016 01:58:04 +0000 (09:58 +0800)]
staging: rtl8712: use container_of() instead of LIST_CONTAINOR()
This patch drops the local definition of LIST_CONTAINOR(), and uses
container_of() instead of it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Tue, 5 Apr 2016 03:09:12 +0000 (20:09 -0700)]
staging: skein: cleanup: align parentheses
Aligned parentheses to conform to the coding style.
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Mon, 4 Apr 2016 23:53:01 +0000 (16:53 -0700)]
staging: skein: cleanup: add operator white space
Added white space between operators and operands. Because this sometimes
maxed out the column width, some expressions were broken up into multiple
lines, and comments were moved appropriately.
Signed-off-by: Manu Kumar <maraku@gmx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Thu, 14 Apr 2016 03:30:13 +0000 (12:30 +0900)]
staging: dgnc: use tty_alloc_driver instead of kcalloc
The tty_alloc_driver() can allocate memory for ttys and termios.
And also allocated memory will be released easily with
put_tty_driver() call.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 5 Apr 2016 09:30:02 +0000 (18:30 +0900)]
staging: dgnc: remove redundant NULL check in
There were already checking NULL about channel_t / un_t
before calling dgnc_maxcps_room().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 5 Apr 2016 09:29:43 +0000 (18:29 +0900)]
staging: dgnc: return -ENOMEM when kzalloc failed
The kzalloc can be failed when memory is not enough
to allocate. When kzalloc failed, it need to return
error code with ENOMEM
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>