Arve Hjønnevåg [Thu, 9 Feb 2012 22:24:38 +0000 (14:24 -0800)]
staging: android-alarm: Update hrtimer if alarm at the head of the queue is reprogrammed
If an alarm was restarted with a value that moved it away from the head
of a queue, the hrtimer would not be updated. This would cause unnecessary
wakeups.
John Stultz [Thu, 9 Feb 2012 22:24:34 +0000 (14:24 -0800)]
staging: android-alarm: Fix namespace collision with upstreamed alarmtimers
The upstreamed alarmtimers are similar but not quite 100% API
compatibile with the android in-kernel alarm api. To aid the
transition, prefix the the android in-kernel api with android_
CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Green [Thu, 9 Feb 2012 22:24:32 +0000 (14:24 -0800)]
staging: android-alarm: Add needed module.h includes
Add module.h includes required to build
CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> CC: Andy Green <andy.green@linaro.org> Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Tweaked commit subject, folded two patches
into one] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Drivers can now create alarms that will use an hrtimer while the
system is running and the rtc to wake up from suspend.
CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Fold and move alarm driver and interface to staging,
fix whitespace issue, drop kconfig & make file changes
as it currently doesn't build -jstultz] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gerard Ryan [Fri, 10 Feb 2012 01:54:50 +0000 (01:54 +0000)]
Staging: bcm: fix CodingStyle warnings/errors reported by checkpatch.pl in led_control.h
This is a patch to the led_control.h file that fixes numerous warnings
and errors reported by the checkpatch.pl tool. There still remain a few
more, but as this is my first attempt at a commit, I'm not going to be
too adventurous!
Signed-off-by: Gerard Ryan <gerard@ryan.lt> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Thu, 9 Feb 2012 22:37:17 +0000 (16:37 -0600)]
staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_AP
When this driver was upgraded to the vendor 20100831 version in
commit 93c55dda092c7 et al,, one listhead initialization was missed.
This broke complete operation of the driver whenever AP mode was
enabled. This fixes https://bugs.archlinux.org/task/27996.
The configuration parameter R8712_AP is misleading as the driver cannot
function as an AP without a heavily hacked version of hostapd. Thus, it
makes sense to remove the parameter; however the code and data configured
for the option is left in.
Peter Huewe [Thu, 9 Feb 2012 20:11:48 +0000 (21:11 +0100)]
staging/xgifb: Use TVCLKBASE_315 as a base address
Since the defines TVVCLKDIV2, TVVCLK, HiTVVCLKDIV2, HiTVVCLK,
HiTVSimuVCLK and HiTVTextVCLK are now defined as relative values, we
have to use TVCLKBASE_315 (0x31) as a base address to get the same values
as before the merge.
The old and now duplicated defines were removed
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Thu, 9 Feb 2012 20:11:47 +0000 (21:11 +0100)]
staging/xgifb: Rename XGI specific initdef.h defines
This patch renames some of the defines that exist in the sis initdef.h
but seem to have a different value.
In order to preserve the functionality of the driver, we simply prepend
these defines with XGI_ (for now) to resolve conflicts and review them
later on.
Peter Huewe [Thu, 9 Feb 2012 20:11:46 +0000 (21:11 +0100)]
staging/xgifb: Rename remaining sis initdef.h defines and remove duplicates
This patch renames the remaining duplicate defines and their usage to
the naming convention of the sis initdef.h and removes the now duplicated
defines.
Peter Huewe [Thu, 9 Feb 2012 20:11:43 +0000 (21:11 +0100)]
staging/xgifb: Include sis initdef.h header
This patch includes the initdef.h header from the sis driver.
Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.
In order to include the initdef.h we have to rename the header guards.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Thu, 9 Feb 2012 18:25:02 +0000 (12:25 -0600)]
staging: zcache: fix serialization bug in zv stats
In a multithreaded workload, the zv_curr_dist_counts
and zv_cumul_dist_counts statistics are being corrupted
because the increments and decrements in zv_create
and zv_free are not atomic.
This patch converts these statistics and their corresponding
increments/decrements/reads to atomic operations.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:04 +0000 (11:07 +0000)]
staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs.
Neither of these drivers has ever been anywhere near the iio abi.
Probably as a result of this the fact they had two event groups
each was not picked up when we restricted IIO to having only
1 event line per device (as part of the chrdev merge set).
As such these definitely didn't work before. This patch squishes
the only element from the 'comparator' event line that isn't in the
'interrupt' one into it and kills off the 'comparator' one.
Ultimately both of these drivers belong in hwmon not IIO and are just
waiting here because I don't want to kill off a driver that may
prove useful to someone. (Ultimately I will ask Greg to scrap
these two if no one steps up to deal with them.)
Jonathan Cameron [Sun, 29 Jan 2012 11:07:03 +0000 (11:07 +0000)]
staging:iio:adc:ad7606 unwind use of is_visible for attrs.
This is the most controversial of this set of is_visible removals.
There are two conditions controlling availability of attrs resulting
in 4 different attribute groups.
Still for a few more lines things are clearer to read to my mind.
We always hold the waitqueue lock when modifying the flags field. So it is safe
to use the non-atomic bitops here instead of the atomic versions.
The lock has to be held, because we need to clear the busy flag and flush the
event FIFO in one atomic operation when closing the event file descriptor.
Add poll support to the event queue. This will allow us to check for pending
events in a application's event loop using poll() or similar. Since we already
have support for blocking reads adding poll support as well is trivial.
staging:iio:events: Use waitqueue lock to protect event queue
Use the waitqueue lock to protect the event queue instead of a custom mutex.
This has the advantage that we can call the waitqueue operations with the lock
held, which simplifies the code flow a bit.
The current IIO event code uses a list to emulate FIFO like behavior.
Just use a kfifo directly instead to implement the event queue. As part of this
patch the maximum of events in the queue is increased from 10 to 16 since kfifo
requires a power of two for the number of FIFO elements.
staging:iio: Factor out event handling into its own file
The core iio file has gotten quite cluttered over time. This patch moves
the event handling code into its own file. Since the event handling code is
largely independent from the core code the only code changes necessary for
this are to make the moved iio_device_register_eventset,
iio_device_unregister_eventset and iio_event_getfd functions non static.
This has also the advantage that industrialio-core.c is now closer again to
its counterpart in the outofstaging branch.
The documentation for the iio_event_interface does not match the actual struct
anymore. This patch removes the documentation for non-existing fields and adds
documentation for missing fields.
Olof Johansson [Fri, 23 Dec 2011 02:46:42 +0000 (18:46 -0800)]
staging:iio: ak8975: add of_match table for device-tree probing
Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
the non-prefixed version (I couldn't figure out if Asahi Kasei had a
stock symbol to use, I only found numerical indexes for their stock info).
Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 9 Jan 2012 15:47:33 +0000 (15:47 +0000)]
staging: comedi: ni_pcidio: Support trailing edge external trigger
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".
The original patch is by Nicholas Nell.
The patch adds support for trailing (falling) edge external triggers for
scans in asynchronous command support in the ni_pcidio driver. This is
supported at least on the PCI-DIO_32HS and PCI-6533 boards; not sure
about the other boards.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Nicholas Nell <nicholas.nell@colorado.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 9 Jan 2012 15:47:30 +0000 (15:47 +0000)]
staging: comedi: ni_pcidio: Mark buffer for writing when setting up DMA.
When setting up the DMA for 'read' streaming acquisition on the DIO
subdevice, mark the whole buffer as writable before starting the DMA.
This prevents a spurious detection of a DMA overwrite of good data
during the first interrupt.
Problem reported by Nicholas Nell. Fix suggested by Frank Mori Hess.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 9 Jan 2012 15:45:45 +0000 (15:45 +0000)]
staging: comedi: adv_pci_dio: Advantech PCI-1739U support
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".
The original patch is by Nicholas Nell.
-----
Advantech PCI-1739U support
Hello,
I've added a bit of simple configuration to adv_pci_dio.c in order to
make the PCI-1739U work with the adv_pci_dio driver. I have tested
inputs only so far but they seem to work. A git style patch is
attached.
Thanks,
--
Nicholas Nell
Professional Research Assistant
University of Colorado
-----
Ian Abbott [Mon, 9 Jan 2012 15:48:19 +0000 (15:48 +0000)]
staging: comedi: ni_pcimio: Add support for NI PXIe-6251
Paul Fulmek reports that PXIe-6251 works the same as the existing
PCIe-6251 and just needs the new PCI device ID adding to ni_pci_table[]
and a new entry adding to ni_boards[] based on the existing entry for
PCIe-6251.
The new entry has PCI device ID 0x72e8 and board name "pxie-6251".
Thanks Paul!
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 29 Jan 2012 20:55:28 +0000 (21:55 +0100)]
staging, media, easycap: Fix mem leak in easycap_usb_probe()
If allocating 'pdata_urb' fails, the function will return -ENOMEM
without freeing the memory allocated, just a few lines above, for
'purb' and will leak that memory when 'purb' goes out of scope.
This patch resolves the leak by freeing the allocated storage with
usb_free_urb() before the return.
This macro is only valid when CONFIG_TIDSPBRDIGE_DEBUG is enabled and it only
prints a log message, it is not a real assertion mechanism like BUG_ON() or
WARN_ON().
It is better to remove them: less code to maintain.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: tidspbridge: remove DBC_ENSURE and DBC_REQUIRED
The kernel does not use a "Design by Contract" approach, and it is only
activated in the module if CONFIG_TIDSPBRDIGE_DEBUG is enabled, so they are
executed rarely. It is better to remove them: less code to maintain.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The function dsp_deinit() always return true, so assert its output is
pointless. As consequence the variable were the returned value is stored, is
no longer needed.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When compiling this report is raised by the compiler:
CC [M] drivers/staging/tidspbridge/rmgr/drv_interface.o
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'bridge_mmap':
drivers/staging/tidspbridge/rmgr/drv_interface.c:275:2: warning: format '%lx' expects type 'long unsigned int', but argument 9 has type 'pgprot_t'
This patch fixes that warning message.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rewrote code to use pr_lvl() instead of printk(). There are still a few
instances of printk(), mainly in the debug code which looks like it's going to
be dropped/rewrote (most of it is blocked out).
Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Sun, 15 Jan 2012 18:22:12 +0000 (19:22 +0100)]
staging/xgifb: Use structs and defines from the sis headers
This patch removes the usage of some xgi structs and defines and
replaces them with the _identical_ structs from the sis headers.
Thus the old structs and defines can be removed.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Sun, 15 Jan 2012 18:22:11 +0000 (19:22 +0100)]
staging/xgifb: Include sis headers
This patch includes the headers of the sis driver and reorders some
includes.
Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes the probed mode LCD_320x480 which isn't supported
anyway since this mode falls through to the default (=invalid) mode in
the
XGIfb_validate_mode function (see line 529 ff. for details. the
commented out code for this mode is also removed).
By removing this assignment, we can use the LCD_TYPEs from the sis
driver without modifications.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Mon, 16 Jan 2012 20:28:37 +0000 (21:28 +0100)]
staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()
If we hit the default case in the switch statement in wpa_ioctl()
we'll leak the memory allocated to 'param' when the variable goes out
of scope without having been assigned to anything.
This patch fixes the leak by kfree()'ing the memory before we return
from the function.
Jesper Juhl [Mon, 16 Jan 2012 20:28:23 +0000 (21:28 +0100)]
staging, vt6656/wpactl.c: A basic style cleanup
This patch cleans up the coding style in
drivers/staging/vt6656/wpactl.c to closer match the generally accepted
kernel CodingStyle. It is by no means a "make it perfect" patch, but
it does get the file a fair bit closer to matching the accepted style
(whomever was involved in the evolution of this file seriously need to
configure their editors to maintain a consistent style - it was a
mess).
Besides pure style cleanups I also took the liberty of removing some
pointless parens, some unneeded casts and removing some commented out code
(it was obviously not used and git has it if it's ever needed in the
future).
Markus Grabner [Thu, 19 Jan 2012 23:09:09 +0000 (00:09 +0100)]
staging: line6: separate handling of buffer allocation and stream startup
There are several features of the Line6 USB driver which require PCM
data to be exchanged with the device:
*) PCM playback and capture via ALSA
*) software monitoring (for devices without hardware monitoring)
*) optional impulse response measurement
However, from the device's point of view, there is just a single
capture and playback stream, which must be shared between these
subsystems. It is therefore necessary to maintain the state of the
subsystems with respect to PCM usage. We define several constants of
the form LINE6_BIT_PCM_<subsystem>_<direction>_<resource> with the
following meanings:
*) <subsystem> is one of
-) ALSA: PCM playback and capture via ALSA
-) MONITOR: software monitoring
-) IMPULSE: optional impulse response measurement
*) <direction> is one of
-) PLAYBACK: audio output (from host to device)
-) CAPTURE: audio input (from device to host)
*) <resource> is one of
-) BUFFER: buffer required by PCM data stream
-) STREAM: actual PCM data stream
The subsystems call line6_pcm_acquire() to acquire the (shared)
resources needed for a particular operation (e.g., allocate the buffer
for ALSA playback or start the capture stream for software monitoring).
When a resource is no longer needed, it is released by calling
line6_pcm_release(). Buffer allocation and stream startup are handled
separately to allow the ALSA kernel driver to perform them at
appropriate places (since the callback which starts a PCM stream is not
allowed to sleep).
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Sun, 15 Jan 2012 11:29:39 +0000 (14:29 +0300)]
staging: precedence bug in crystalhd_stop_tx_dma_engine()
The intent here is to see if we have cleared the DMA_START_BIT flag. We
clear it a couple lines later. The current code has a precedence bug so
it is equivalent to "if (!dma_cntrl) { ...".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Thu, 9 Feb 2012 01:42:03 +0000 (19:42 -0600)]
staging: r8712u: Simplify semaphores
I am preparing to convert this driver from semaphore to mutex locking,
The first step has been to eliminate a number of semaphores that were
initialized but never used, and one whose only use was a single "up"
after initialization. A total of 9 semaphores were removed in this process.
One other change was to remove some inline semaphore routines that were
unused.
In addition, several cases had the following structure:
down()
if () {
...
}
up()
The locking overhead was reduced by moving the up/down inside the if
block.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>