Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5791: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5764: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5755: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5686: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5624r_spi: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5504: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5449: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5446: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5421: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5380: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5360: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Mon, 19 Aug 2013 11:38:00 +0000 (12:38 +0100)]
iio: dac: ad5064: Use devm_* APIs
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Oleksandr Kozaruk [Mon, 19 Aug 2013 11:09:00 +0000 (12:09 +0100)]
iio: adc: twl6030-gpadc: Use devm_* API family
Using devm_iio_device_alloc and devm_request_threaded_irq makes
code simpler.
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sun, 18 Aug 2013 12:59:00 +0000 (13:59 +0100)]
iio: adjd_s311: Cleanup unused #defines
using word reads, no need for HI/LO register #defines
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sun, 18 Aug 2013 13:07:00 +0000 (14:07 +0100)]
iio: Remove unnecessary _write_raw_get_fmt() in several hid-sensor drivers
IIO_VAL_INT_PLUS_MICRO is the default, no need to return it explicitly
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jacek Anaszewski [Fri, 16 Aug 2013 13:11:00 +0000 (14:11 +0100)]
iio: trigger: implement devm_iio_trigger_alloc/devm_iio_triger_free
Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free()
to automatically clean up triggers allocated by IIO drivers, thus
leading to simplified IIO drivers code.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyunmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Oleksandr Kozaruk [Thu, 25 Jul 2013 13:26:00 +0000 (14:26 +0100)]
iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC,
known also as Phoenix and PhoenixLite.
The TWL6030 and TWL6032 have GPADC with 17 and 19 channels
respectively. Some channels have current source and are used for
measuring voltage drop on resistive load for detecting battery ID
resistance, or measuring voltage drop on NTC resistors for external
temperature measurements. Some channels measure voltage, (i.e. battery
voltage), and have voltage dividers, thus, capable to scale voltage.
Some channels are dedicated for measuring die temperature.
Some channels are calibrated in 2 points, having offsets from ideal
values kept in trim registers. This is used to correct measurements.
The differences between GPADC in TWL6030 and TWL6032:
- 10 bit vs 12 bit ADC;
- 17 vs 19 channels;
- channels have different purpose(i.e. battery voltage
channel 8 vs channel 18);
- trim values are interpreted differently.
Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K,
Girish S Ghongdemath.
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hector Palacios [Mon, 22 Jul 2013 14:03:00 +0000 (15:03 +0100)]
iio: mxs-lradc: change the realbits to 12
The LRADC virtual channels have an 18 bit field to store the sum of up
to 2^5 accumulated samples. The read_raw function however only operates
over a single sample (12 bit resolution).
In order to use this field for scaling operations, we need it to be the
exact resolution value of the LRADC.
Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
report touch coordinates to userland. A 12 bit mask should be used instead
or else the touch libraries will expect a coordinates range between 0
and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adis16060_core: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: st_gyro: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: itg3200_core: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Christian Strobel <christian.strobel@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adxrs450: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: hid-sensor-gyro-3d: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adis16260: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adis16136: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adis16130: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 13 Aug 2013 06:34:00 +0000 (07:34 +0100)]
iio: gyro: adis16080: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Thu, 8 Aug 2013 16:39:00 +0000 (17:39 +0100)]
iio: Restore alphabetic order in Makefile
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Thu, 8 Aug 2013 16:39:00 +0000 (17:39 +0100)]
iio: Add tmp006 IR temperature sensor
the TI TMP006 is a non-contact temperature sensor with I2C interface;
it measures the surface temperature of a distance object using a
thermopile to absorb IR energy emitted from the object
the sensor has two channels: IR sensor voltage (16-bit) and reference
temperature of the chip (14-bit); datasheet is here:
http://www.ti.com/lit/ds/symlink/tmp006.pdf
v2 (thanks to Grygorii Strashko, Lars-Peter Clausen, Jonathan Cameron
for review comments):
* power down device on driver remove
* use sign_extend32()
* style cleanup
* add comments what channel raw LSBs mean
* spelling of thermopile
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: LM Sensors <lm-sensors@lm-sensors.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Yann Droneaud [Thu, 15 Aug 2013 13:10:54 +0000 (15:10 +0200)]
android/sync: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().
Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.
In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.
This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Colin Cross <ccross@google.com>
Link: http://lkml.kernel.org/r/CACSP8SjXGMk2_kX_+RgzqqQwqKernvF1Wt3K5tw991W5dfAnCA@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yann Droneaud [Thu, 15 Aug 2013 13:10:53 +0000 (15:10 +0200)]
android/sw_sync: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().
Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.
In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.
This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Colin Cross <ccross@google.com>
Link: http://lkml.kernel.org/r/CACSP8SjZcpcpEtQHzcGYhf-MP7QGo0XpN7-uN7rmD=vNtopG=w@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Thu, 15 Aug 2013 20:27:22 +0000 (21:27 +0100)]
staging: vt6656: desc.h Move typedef struct tagSCTS* to new structures in rxtx.h
The new structures being
typedef struct tagSCTS -> struct vnt_cts
typedef struct tagSCTS_FB -> struct vnt_cts_fb
These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.
The linux/ieee80211.h in desc.h is no longer needed.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Thu, 15 Aug 2013 20:23:25 +0000 (21:23 +0100)]
staging: vt6656: desc.h Remove typedef struct tagSRTS_* to new strutures in rxtx.h
The new structures being
typedef struct tagSRTS_g -> struct vnt_rts_g
typedef struct tagSRTS_g_FB -> struct vnt_rts_g_fb
typedef struct tagSRTS_ab -> struct vnt_rts_ab
typedef struct tagSRTS_a_FB -> struct vnt_rts_a_fb
These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jens Frederich [Thu, 15 Aug 2013 19:40:01 +0000 (21:40 +0200)]
Staging: olpc_dcon: more big endian conformity
Using an int which is casted to unsigned char as inbuf is messy.
The code won't work on big endian systems. The patch should fix
this.
Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jens Frederich [Thu, 15 Aug 2013 19:34:55 +0000 (21:34 +0200)]
Staging: olpc_dcon: replace some magic numbers
This patch replace some magic numbers. I believe it makes
the driver more readable.
The magic number 0x26 is the XO system embedded controller
(EC) command 'DCON power enable/disable'.
Number 0x41, and 0x42 are special memory controller settings
register. The 0x41 initialize bit sequence 0x101 means:
enable memory power down function and special SDRAM clock
delay for synchronize SDRAM output and clock signal.
The 0x42 initialize squence 0x101 is wrong. According to
the specification Bit 8 is reserved, thus not in use.
I removed it.
Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Thu, 15 Aug 2013 18:40:08 +0000 (19:40 +0100)]
staging: vt6656: rxtx.h : remove typedef struct tagSBEACON_BUFFER
Replace with struct vnt_beacon_buffer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Thu, 15 Aug 2013 18:37:04 +0000 (19:37 +0100)]
staging: vt6656: rxtx.c : s_bPacketToWirelessUsb remove usbPacketBuf.
Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.
Fix the calling to s_bPacketToWirelessUsb so it attached to
the calling struct vnt_tx_buffer pTX_Buffer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Thu, 15 Aug 2013 18:34:37 +0000 (19:34 +0100)]
staging: vt6656: rxtx.c remove typdef PTX_BUFFER
Rename to vnt_tx_buffer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Thu, 15 Aug 2013 11:00:22 +0000 (12:00 +0100)]
staging: ozwpan: Remove extra variable.
We should not use extra variable just to copy pointer value,
renaming parameter name serves pupose & removes extra variable.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Thu, 15 Aug 2013 11:00:21 +0000 (12:00 +0100)]
staging: ozwpan: Remove unneeded variable initializer
We are assigning value to hport before returning, there is
no need to initialize it.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Thu, 15 Aug 2013 14:28:22 +0000 (10:28 -0400)]
staging: dgnc: removes proc code
This patch removes the dgnc_proc.c and dgnc_proc.h files and all
references to proc functions in dgnc_driver.c. This also removes proc.h
from the include headers in driver.c, mgmt.c and sysfs.c and proc.o
from the Makefile.
Drivers now use sysfs instead of proc.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrew Morton [Tue, 13 Aug 2013 20:55:48 +0000 (13:55 -0700)]
drivers/staging/comedi/drivers/das16.c: needs slab.h
alpha allmodconfig:
drivers/staging/comedi/drivers/das16.c: In function 'das16_detach':
drivers/staging/comedi/drivers/das16.c:1234: error: implicit declaration of function 'kfree'
Cc: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Tue, 13 Aug 2013 19:17:11 +0000 (20:17 +0100)]
staging: vt6656: rxtx.c s_uGetRTSCTSDuration return endian u16
The return value of uGetRTSCTSDuration always needs to be
corrected to a u16 little endian corrected value.
Some places the endian correction is done on the next line
Change uGetRTSCTSDuration return u16 little endian corrected value.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Tue, 13 Aug 2013 18:59:31 +0000 (19:59 +0100)]
staging: vt6656: rxtx.c s:_uGetDataDuration simplify structure.
A value is only returned when bNeedAck is true.
Only when byDurType == DATADUR_B is different.
Remove switch statement and simplify with if structure.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Tue, 13 Aug 2013 18:52:08 +0000 (19:52 +0100)]
staging: vt6656: rxtx.h dead code typedef union tagUTX_BUFFER_CONTAINER
This is part of the Remote NDIS message format with patch
vt6656: rxtx.c: s_vGetFreeContext use single tx memset.
there is not need for this structure and its members.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Tue, 13 Aug 2013 18:47:08 +0000 (19:47 +0100)]
staging: vt6656: rxtx.h always pack BEACON_BUFFER/TX_BUFFER
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Only the first 4 members of these structures are live.
The forth member is referenced at run-time by packed structures.
typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
in desc.h
If these structures are not packed the alignment of these members
will be wrong.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 13 Aug 2013 17:29:26 +0000 (18:29 +0100)]
staging: ozwpan: Separate success & failure case for oz_hcd_pd_arrived()
This patch separates success & failure block along with fixing
following issues:-
1. The way oz_hcd_pd_arrived() looks now it's easy to think we free "ep" but
actually we do this spaghetti thing of setting it to NULL on success.
2. It is hard to read it because there are unlocks scattered throughout.
3. Currently we set "ep" to NULL on the success path and then test it and or
free it. In current code you have to scroll to the start of the function
to read code.
Original patch was submitted by Dan here :-
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-August/040113.html
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:29:25 +0000 (18:29 +0100)]
staging: ozwpan: Swap arguments of oz_ep_alloc() to match kmalloc()
Swap arguments of oz_ep_alloc() to match kmalloc() for better readability.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:29:24 +0000 (18:29 +0100)]
staging: ozwpan: Remove unneeded initializers
Remove variable initialization wherever it is not required.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:29:23 +0000 (18:29 +0100)]
staging: ozwpan: Make oz_hcd_pd_departed() take a struct pointer.
oz_hcd_pd_departed() takes struct oz_port pointer instead of
void *, change function declaration to avoid ambiguity.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:29:22 +0000 (18:29 +0100)]
staging: ozwpan: Make oz_hcd_pd_arrived() return a struct pointer
oz_hcd_pd_arrived returns struct oz_port *, change function
declaration to avoid ambiguity.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:29:21 +0000 (18:29 +0100)]
staging: ozwpan: Remove unnecessary pointer check.
We are already checking "ep" earlier in function. Do not
need to check again.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:24:24 +0000 (18:24 +0100)]
staging: ozwpan: Fix coding style.
Put spaces around math operations.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:24:23 +0000 (18:24 +0100)]
staging: ozwpan: Simply if condition
Making code simpler for readability.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:24:22 +0000 (18:24 +0100)]
staging: ozwpan: Add a blank line between functions & declarations.
This patch adds a blank line between global declarations &
functions for readability.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Tue, 13 Aug 2013 17:24:21 +0000 (18:24 +0100)]
staging: ozwpan: Add a blank line between declaraction and code.
This patch adds blank line between declaration &
code for readability.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:58 +0000 (15:49 -0400)]
staging: dgnc: removes read_cnt, real_raw, rawreadok and buf
This patch removes the use of read_cnt, real_raw, buf and rawreadok. The
variable buf is never used in the code. The variables rawreadok read_cnt
and real_raw don't exist in the new API. Reading the data raw is no
longer supported by the tty layer.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:57 +0000 (15:49 -0400)]
staging: dgnc: fixes ioctl param list
The declaration for the ioctl function has changed. The previous version
of this declaration took struct file *file as a parameter and the new
one does not. This patch removes that parameter.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:56 +0000 (15:49 -0400)]
staging: dgcn: removes unnecessary commands in ioctl
The commands TIOCGETP, TCGETS, and TCGETA are not supposed to be seen by
the ioctl. This patch removes the switch cases for these commands.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:55 +0000 (15:49 -0400)]
staging: dgnc: dereferences ts var in dgnc_tty_close()
The value tty->termios needed to be dereferenced to be assigned to the
variable ts.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:54 +0000 (15:49 -0400)]
staging: dgnc: fixes tty_port and tty_struct params
The functions tty_flip_buffer_push, tty_insert_flip_string,
tty_insert_flip_char and tty_buffer_request_room now require a struct of
type tty_port instead of struct tty_struct. This patch makes those
changes.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:53 +0000 (15:49 -0400)]
staging: dgnc: fixes termios error
This patch fixes this error: invalid type argument of ‘->’ (have ‘struct ktermios’).
There were changes in the tty layer's API. Access to the termios flags changed from tty->termios->*flag* to tty->termios.*flag*.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lidza Louina [Tue, 13 Aug 2013 19:49:51 +0000 (15:49 -0400)]
staging: dgnc: removes Makefile.inc
The Makefile contains the variables needed for the driver to build.
The Makefile.inc isn't needed.
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 7 Aug 2013 20:31:48 +0000 (21:31 +0100)]
staging: vt6656: rxtx.c s_uFillDataHead remove dead variables.
As result of patches
staging: vt6656: rxtx.c: s_uGetDataDuration remove First Frag or Mid Frag dead code
staging: vt6656: rxtx.c: s_uGetDataDuration remove dead variables.
variables uFragIdx, cbLastFragmentSize, uMACfragNum are dead.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 7 Aug 2013 20:28:45 +0000 (21:28 +0100)]
staging: vt6656: rxtx.c: s_uGetDataDuration remove dead variables.
As result of patch
staging: vt6656: rxtx.c s_uGetDataDuration remove First Frag or Mid Frag dead code.
cbFrameLength, wRate, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption are
dead variables.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 7 Aug 2013 20:26:12 +0000 (21:26 +0100)]
staging: vt6656: rxtx.c: s_uGetDataDuration remove First Frag or Mid Frag dead code.
The driver always calls s_uGetDataDuration with;
uFragIdx = 0, cbLastFragmentSize = 0 and uMACfragNum = 1
uFragIdx == (uMACfragNum-1) is always true and bLastFrag = 1.
Remove dead First Frag or Mid Frag if/else and variables.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Minchan Kim [Mon, 12 Aug 2013 06:13:56 +0000 (15:13 +0900)]
zram: don't grab mutex in zram_slot_free_noity
[1] introduced down_write in zram_slot_free_notify to prevent race
between zram_slot_free_notify and zram_bvec_[read|write]. The race
could happen if somebody who has right permission to open swap device
is reading swap device while it is used by swap in parallel.
However, zram_slot_free_notify is called with holding spin_lock of
swap layer so we shouldn't avoid holing mutex. Otherwise, lockdep
warns it.
This patch adds new list to handle free slot and workqueue
so zram_slot_free_notify just registers slot index to be freed and
registers the request to workqueue. If workqueue is expired,
it holds mutex_lock so there is no problem any more.
If any I/O is issued, zram handles pending slot-free request
caused by zram_slot_free_notify right before handling issued
request because workqueue wouldn't be expired yet so zram I/O
request handling function can miss it.
Lastly, when zram is reset, flush_work could handle all of pending
free request so we shouldn't have memory leak.
NOTE: If zram_slot_free_notify's kmalloc with GFP_ATOMIC would be
failed, the slot will be freed when next write I/O write the slot.
[1] [
57ab0485, zram: use zram->lock to protect zram_free_page()
in swap free notify path]
* from v2
* refactoring
* from v1
* totally redesign
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Minchan Kim [Mon, 12 Aug 2013 06:13:55 +0000 (15:13 +0900)]
zram: fix invalid memory access
[1] tried to fix invalid memory access on zram->disk but it didn't
fix properly because get_disk failed during module exit path.
Actually, we don't need to reset zram->disk's capacity to zero
in module exit path so that this patch introduces new argument
"reset_capacity" on zram_reset_divice and it only reset it when
reset_store is called.
[1]
6030ea9b, zram: avoid invalid memory access in zram_exit()
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Zimmerman [Sun, 11 Aug 2013 19:50:17 +0000 (12:50 -0700)]
staging: dwc2: reorder some kernel doc comments and struct members
Reorder the kernel doc comments for 'struct dwc2_core_params' to
match the ordering in the struct itself. Reorder the members of
'struct dwc2_qh' (and its kerneldoc comments) to minimize the
amount of structure padding.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Werner [Sun, 11 Aug 2013 15:20:23 +0000 (17:20 +0200)]
Staging: imx-drm: imx-tve.c Fixed 80 character line coding style issue
Fixed a coding style issue of 80 character per line.
Signed-off-by: Andreas Werner <wernerandy@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shaun Laing [Fri, 9 Aug 2013 13:54:24 +0000 (07:54 -0600)]
staging: cxt1e1: Remove #define SBE_INCLUDE_SYMBOLS
Removed the unneeded SBE_INCLUDE_SYMBOLS #define, and the associated STATIC
#define, and replaced all occurances of STATIC with 'static'. This was in
response to sparse warnings of the form "symbol 'XYZ' was not declared. Should
it be static?".
Removed a function prototype (musycc_init_port) as adding the 'static'
declaration produced a new gcc warning. (musycc_init_port is only declared if
SBE_WAN256T3_ENABLE is set)
Signed-off-by: Shaun Laing <shaun@xresource.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kumar Gaurav [Thu, 8 Aug 2013 18:23:24 +0000 (23:53 +0530)]
Staging: zram: zram_drv.c: Fixed Error of trailing whitespace
Fixed by removing trailing whitespace
Signed-off-by: Kumar Gaurav <kumargauravgupta3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Thu, 8 Aug 2013 10:56:44 +0000 (12:56 +0200)]
Staging: rtl8192e: rtllib_rx: checking NULL value after doing dev_alloc_skb
Checking the return of dev_alloc_skb as stated in the following bug:
https://bugzilla.kernel.org/show_bug.cgi?id=60401
Reported-by: RUC_Soft_Sec rucsoftsec@gmail.com
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 6 Aug 2013 16:32:33 +0000 (09:32 -0700)]
staging: comedi: drivers: use comedi_dio_insn_config() for simple cases
Convert the drivers with simple, per channel programmable i/o, to use the
comedi_dio_insn_config() helper function.
All of these pass a 'mask' of '0' to comedi_dio_insn_config() this causes
the per channel mask to be used to configure the i/o direction.
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 [Tue, 6 Aug 2013 16:31:59 +0000 (09:31 -0700)]
staging: comedi: skel: use comedi_dio_insn_config()
Convert this driver to use the comedi_dio_insn_config() helper function.
Tidy up the comments to reflect the new code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 6 Aug 2013 16:31:35 +0000 (09:31 -0700)]
staging: comedi: drivers: introduce comedi_dio_insn_config()
DIO subdevices always handle the INSN_CONFIG_DIO_{INPUT,OUTPUT} instructions
to configure the DIO channels. They also always handle the INSN_CONFIG_DIO_QUERY
instruction to query the configuration of a DIO channel.
Introduce a helper function to handle the (*insn_config) boilerplate for
comedi DIO subdevices. This function has the same paramters as (*insn_config)
functions with an additional parameter to allow the caller to pass a 'mask'
value for grouped DIO channels.
This function returns:
0 if the instruction was successful but requires additional handling by
the caller (INSN_CONFIG_DIO_{INPUT,OUTPUT}
insn->n if the instruction was handled (INSN_CONFIG_DIO_QUERY)
-EINVAL for all unhandled instructions
The caller is responsible for actually configuring the hardware based on
the configuration (s->io_bits).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 12 Aug 2013 22:17:17 +0000 (15:17 -0700)]
Revert "staging: comedi: skel: use comedi_dio_insn_config()"
This reverts commit
42ef678bef336a83fd0ae0b03a56c0a93665a18b.
It's incorrect as well... time for more coffee...
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 12 Aug 2013 22:16:24 +0000 (15:16 -0700)]
Revert "staging: comedi: core: introduce comedi_dio_insn_config()"
This reverts commit
4f76463d3b8f8cc0cac5bb292ec766848f3f4fa1.
I applied an incorrect version here as well :(
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 6 Aug 2013 16:33:05 +0000 (09:33 -0700)]
staging: comedi: drivers: use comedi_dio_insn_config() for complex cases
Convert the drivers with complex, port programmable i/o, to use the
comedi_dio_insn_config() helper function.
All of these drivers have some sort of 'port' programmable i/o where multiple
i/o channels are configured as a group. The 'mask' associated with the group
is passed to comedi_dio_insn_config() so that all the channels are configured.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko [Mon, 12 Aug 2013 11:39:22 +0000 (14:39 +0300)]
staging: lustre: re-use kbasename() common helper
To get the name of a file from a pathname we may use kbasename() helper.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 12 Aug 2013 22:14:18 +0000 (15:14 -0700)]
Revert "staging: comedi: drivers: use comedi_dio_insn_config() for complex cases"
This reverts commit
f21c53945cb95f66faa9636af5f23cb00ba73019.
I applied the wrong patch :(
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 12 Aug 2013 22:07:49 +0000 (15:07 -0700)]
staging: zcache: delete it
zcache is obsolete and not used anymore, Bob Liu has rewritten it and is
submitting it for inclusion through the main -mm tree, as it should have
been done in the first place...
Cc: Bob Liu <lliubbo@gmail.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 5 Aug 2013 22:01:25 +0000 (15:01 -0700)]
staging: comedi: drivers: use comedi_dio_insn_config() for complex cases
Convert the drivers with complex, port programmable i/o, to use the
comedi_dio_insn_config() helper function.
All of these drivers have some sort of 'port' programmable i/o where multiple
i/o channels are configured as a group. The 'mask' associated with the group
is passed to comedi_dio_insn_config() so that all the channels are configured.
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, 5 Aug 2013 22:00:36 +0000 (15:00 -0700)]
staging: comedi: skel: use comedi_dio_insn_config()
Convert this driver to use the comedi_dio_insn_config() helper function.
Tidy up the comments to reflect the new code.
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, 5 Aug 2013 22:00:05 +0000 (15:00 -0700)]
staging: comedi: core: introduce comedi_dio_insn_config()
DIO subdevices always handle the INSN_CONFIG_DIO_{INPUT,OUTPUT} instructions
to configure the dio channels. They also always handle the INSN_CONFIG_DIO_QUERY
instruction to query the configuration of a dio channel.
Introduce a helper function to handle the (*insn_config) boilerplate for
comedi DIO subdevices. This function has the same parameters as (*insn_config)
functions with an additional parameter to allow the caller to pass a 'mask'
value for grouped dio channels.
This function returns:
0 if the instruction was successful but requires additional handling by
the caller (INSN_CONFIG_DIO_{INPUT,OUTPUT}
insn->n if the instruction was handled (INSN_CONFIG_DIO_QUERY)
-EINVAL for all unhandled instructions
The caller is responsible for actually configuring the hardware based on
the configuration (s->io_bits).
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>
Malcolm Priestley [Mon, 5 Aug 2013 21:12:42 +0000 (22:12 +0100)]
staging: vt6656: desc.h remove typedef struct tagSCTSData
Replace structures with struct ieee80211_cts data
typedef struct tagSCTSData include extra packing wReserved
not in struct ieee80211_cts
This is corrected by adding reserved2 to the structures.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 5 Aug 2013 21:08:05 +0000 (22:08 +0100)]
staging: vt6656: desc.h remove typedef struct tagSRTSData
Replace structures with struct ieee80211_rts data.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 5 Aug 2013 20:09:14 +0000 (21:09 +0100)]
staging: vt6656: rxtx.c: s_vGetFreeContext use single tx memset.
memset to 0 structure _USB_SEND_CONTEXT pContext->Data to its
size of MAX_TOTAL_SIZE_WITH_ALL_HEADERS as defined
in device.h
This removes the need for memset in the TX path.
It also allows the removal of dead structure
TX_BUFFER_CONTAINER BufferHeader;
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Mon, 5 Aug 2013 17:40:15 +0000 (18:40 +0100)]
staging: ozwpan: Return correct hub status.
Fix a bug where we were not returning correct hub status
for 8th port.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Mon, 5 Aug 2013 17:40:14 +0000 (18:40 +0100)]
staging: ozwpan: Reset port configuration number.
Make sure that we reset port configuration no. when PD departs.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Mon, 5 Aug 2013 09:58:32 +0000 (11:58 +0200)]
Staging: winbond: mds_f: deleted extern function
Deleted an extern function that wasn't used in this driver.
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Mon, 5 Aug 2013 09:58:31 +0000 (11:58 +0200)]
Staging: winbond: mds_f: fixed lines over 80 characters
Fixed some coding style issues.
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Mon, 5 Aug 2013 09:58:30 +0000 (11:58 +0200)]
Staging: winbond: mds: fixed some lines over 80 characters
Fixed some coding style issues
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Mon, 5 Aug 2013 09:58:29 +0000 (11:58 +0200)]
Staging: winbond: wb35reg: avoided use of extern function
Prototype of a function added to the header to avoid the use of extern.
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Iker Pedrosa [Mon, 5 Aug 2013 09:58:28 +0000 (11:58 +0200)]
Staging: winbond: wb35reg: white space deleted
White space deleted before a semicolon.
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kumar Gaurav [Sun, 4 Aug 2013 18:41:02 +0000 (00:11 +0530)]
Staging: xgifb: Fixed a warning of Space before semicolon
Fixed issue by removing Space before semicolon
Signed-off-by: Kumar Gaurav <kumargauravgupta3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jens Frederich [Sun, 4 Aug 2013 18:57:43 +0000 (20:57 +0200)]
Staging: olpc_dcon: updating MAINTAINERS
Andres Salomon and Chris Ball are not longer at OLPC.
Daniel Drake is the new OLPC go-to guy. And I wanna
also be CC'd on DCON and other OLPC patches.
Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Mon, 5 Aug 2013 17:40:12 +0000 (18:40 +0100)]
staging: ozwpan: Fixes crash due to invalid port aceess.
This patch fixes kernel crash issue, when we receive URB request
after de-enumerating device.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Mon, 5 Aug 2013 11:28:33 +0000 (12:28 +0100)]
staging: ozwpan: Fix farewell report.
This patch fix following issues reported by Dan:-
1) There is no check limiting the size to 32 and it could be up to
253 bytes.
2) Use defines instead of magic numbers.
3) The oz_farewell struct is supposed to be a variable length struct
but the variable part is put in the middle. It doesn't make any
sense to put the length of the variable size array after then end
of the array because we can never find it again! Put the
variable size array at the end. Make it a zero length array.
u8 len;
u8 report[0];
4) In oz_add_farewell() we do this:
f = kmalloc(sizeof(struct oz_farewell) + len - 1, GFP_ATOMIC);
The "- 1" refers to sizeof(f->report) but because it was a magic
number then it was missed when the sizeof(f->report) changed.
5) In [patch 6/6] we set the ->len member. But because it is at the
end of a variable length array with no limit check the remote
attacker can just rewrite it using the memcpy() on the next line.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Mon, 5 Aug 2013 11:14:04 +0000 (12:14 +0100)]
staging: ozwpan: Fix build warning.
This patch fixes following build warning.
drivers/built-in.o: In function `oz_hcd_heartbeat':
>> (.text+0x30aadd): undefined reference to `__divdi3'
drivers/built-in.o: In function `oz_hcd_heartbeat':
>> (.text+0x30ac85): undefined reference to `__divdi3'
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>