Rupesh Gujare [Thu, 22 Aug 2013 16:38:51 +0000 (17:38 +0100)]
staging: ozwpan: Create deferred work to destroy PD object.
Currently we call oz_pd_destroy() from softirq context, where we
try to destroy relevant data structures, as well we kill a tasklet
which always result in following kernel warning.
[12279.262194] Attempt to kill tasklet from interrupt
[12279.262202] Attempt to kill tasklet from interrupt
This patch defers deallocation of data structures to work queue.
Rupesh Gujare [Thu, 22 Aug 2013 16:38:48 +0000 (17:38 +0100)]
staging: ozwpan: Fix crash for race condition.
Do not allocate a port to new device or process URB when its status is
yet to be read. This avoids race condition when USB core read hub
status a bit late, while new device tries to acquire port.
This patch removes the HAVE_UNLOCKED_IOCTL conditional
statements from driver.c, mgmt.c and mgmt.h. This was
used to support older kernels. It isn't needed now.
Lidza Louina [Thu, 22 Aug 2013 01:48:38 +0000 (21:48 -0400)]
staging: dgap: tty.c: 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.
It also removes cases for the commands TIOCGETP
TCGETS and TCGETA.
Lidza Louina [Thu, 22 Aug 2013 01:48:37 +0000 (21:48 -0400)]
staging: dgap: tty.c: removes read_cnt, real_raw and rawreadok
This patch removes the use of read_cnt, real_raw and rawreadok.
These variables don't exist in the new API. Reading the data
raw is no longer supported by the tty layer.
Lidza Louina [Thu, 22 Aug 2013 01:48:35 +0000 (21:48 -0400)]
staging: dgap: tty.c: fixes errors with tty function calls
This patch fixes errors with the tty function calls
tty_buffer_request_room, tty_insert_flip_string_flags,
tty_insert_flip_string and tty_flip_buffer_push.
They now take struct tty_port as a parameter instead
of tty_struct.
Lidza Louina [Thu, 22 Aug 2013 01:48:34 +0000 (21:48 -0400)]
staging: dgap: fep5.c: fixes errors with tty function calls
This patch fixes errors with the tty function calls
tty_buffer_request_room, tty_insert_flip_char and
tty_flip_buffer_push. They now take struct tty_port
as a parameter instead of tty_struct.
Lidza Louina [Thu, 22 Aug 2013 01:48:33 +0000 (21:48 -0400)]
staging: dgap: removes references to proc code
This patch removes references to proc code in this
driver. It still has proc.c, proc.h and a board
state called NEEDS_PROC_CREATION. All three of
these will be removed in another patch.
Ian Abbott [Tue, 20 Aug 2013 10:50:19 +0000 (11:50 +0100)]
staging: comedi: pcmuio: fix possible NULL deref on detach
pcmuio_detach() is called by the comedi core even if pcmuio_attach()
returned an error, so `dev->private` might be `NULL`. Check for that
before dereferencing it.
Also, as pointed out by Dan Carpenter, there is no need to check the
pointer passed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 20 Aug 2013 15:55:41 +0000 (16:55 +0100)]
staging: comedi: pcmmio: remove unneeded checks on detach
As pointed out by Dan carpenter for the similar pcmuio driver, there is
no need to check the pointer passed to `kfree()`, so remove that check
from `pcmmio_detach()`.
Also, check the `devpriv` (`dev->private`) pointer once, outside the
`for` loop.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tushar Behera [Thu, 22 Aug 2013 13:24:23 +0000 (18:54 +0530)]
staging: dgnc: driver.c: Need to include slab.h
With 'allyesconfig', we get following error without this.
drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_cleanup_board’:
drivers/staging/dgnc/dgnc_driver.c:459:3: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
kfree(brd->msgbuf_head);
^
drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_driver_kzmalloc’:
drivers/staging/dgnc/dgnc_driver.c:905:2: error: implicit declaration of function ‘kmalloc’ [-Werror=implicit-function-declaration]
void *p = kmalloc(size, priority);
In rxtx.c many calls to BBvCaculateParameter are not endian
corrected all calls here need to be endian corrected.
Correct the endian in BBvCaculateParameter.
In card.c: CARDvSetRSPINF pwPhyLen points to awLen and is
manually applied to abyData. Because it is now endian
corrected put_unaligned is needed to correct it.
In rxtx.c remove were endian is corrected.
This allows to merge BBvCalculateParameter *pwPhyLen,*pbyPhySrv
and *pbyPhySgn to singles structure for tx buffers.
In dt282x_ai_insn_read() we call this macro like:
wait_for(!mux_busy(), comedi_error(dev, "timeout\n"); return -ETIME;);
Because the if statement doesn't have curly braces it means we always
return -ETIME and the function never succeeds.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ian Abbott <abbotti@mev.co.uk> Cc: stable <stable@vger.kernel.org> # 2.6.36+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Tue, 20 Aug 2013 21:42:43 +0000 (22:42 +0100)]
staging: et131x: Remove frame error TODO item
After prolonged testing for a few days of normal use with new et131x
hardware, I've concluded that this was a hardware issue with the older
hardware I had. Removing this item from the TODO.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jens Frederich [Tue, 20 Aug 2013 13:53:06 +0000 (15:53 +0200)]
Staging: olpc_dcon: Removed more completed TODO entries
1. Console event notifier support: No one I've asked knows what this
all about.
2. Audit code for unnecessary code: This is done.
3. Verify sane i2cAPI usage: This is also done.
This patch removes the HAVE_UNLOCKED_IOCTL conditional
statements from driver.c, mgmt.c and mgmt.h. This was
used to support older kernels. It isn't needed now.
Won Kang [Fri, 16 Aug 2013 04:13:44 +0000 (13:13 +0900)]
staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Fixed mis-use of mutex for gdm_table. gdm_table is refered to only
inside tty_install and port destrcut, and usb callbacks use internal
reference which was saved during urb submission
Signed-off-by: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jens Frederich [Sat, 17 Aug 2013 14:20:29 +0000 (16:20 +0200)]
Staging: olpc_dcon: Already completed TODO entry removed
The TODO entry - drop global variables, use a proper olpc_dcon_priv
struct - is already finished. The driver has no global variables.
It uses the private structure 'dcon_priv'.
Merge tag 'iio-for-3.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second round of new drivers, features and cleanups for IIO in the 3.12 cycle.
New driver:
1) tmp006 IR thermopile driver. This is an unusual temperature sensor
and was taken in to IIO with the knowledge and agreement of a hwmon
maintainer.
It measures remote temperature using infrared emissions.
I guess taking this may mean we have to fight off submissions of
devices much more suited to hwmon but such is life and we end up
doing this from time to time already.
2) twl6030 adc driver.
Cleanups:
1) More devm_* cleanups following on from the introduction of
devm_iio_device_alloc. Mostly an heroic effort from
Sachin Kamat!
2) Introduce devm_iio_trigger_alloc etc to handle trigger
allocation and deallocation in a managed fashion. There
aren't as many instances of triggers as devices, but this
will allow futher reduction in error patch complexity in
some of our most complex drivers making it a very good thing.
3) Trivial removal of unused defines in adjd_s311
4) Drop some write_raw_get_fmt callbacks where they were only
returning the default value.
5) Change mxs-lradc realbits to 12. Whilst an 18bit register
is used on the device, in its current mode only 12 bits of
useful data are returned. For now the packing is unchanged
in the buffer and this change mainly effects the input support
in the driver.
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>
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>
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>