[PARISC] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts

The following build error occured during a parisc build with
swap-over-NFS patches applied.

net/core/sock.c:274:36: error: initializer element is not constant
net/core/sock.c:274:36: error: (near initialization for 'memalloc_socks')
net/core/sock.c:274:36: error: initializer element is not constant

Dave Anglin says:
> Here is the line in sock.i:
>
> struct static_key memalloc_socks = ((struct static_key) { .enabled =
> ((atomic_t) { (0) }) });

The above line contains two compound literals.  It also uses a designated
initializer to initialize the field enabled.  A compound literal is not a
constant expression.

The location of the above statement isn't fully clear, but if a compound
literal occurs outside the body of a function, the initializer list must
consist of constant expressions.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
[PARISC] fix personality flag check in copy_thread()

Directly comparing task_struct->personality against PER_* is not fully
correct, as it doesn't take flags potentially stored in top three bytes
into account.

Analogically, directly forcefully setting personality to PER_LINUX32 or
PER_LINUX discards any flags stored in the top three bytes.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ASoC: omap-mcpdm: Convert to use devm_*

Switch to use devm_* te make the probe/remove code more cleaner.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: isabelle: Remove version.h header file inclusion

version.h header file inclusion is no longer needed for this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm8994: Implement support for self-oscillation mode in the FLL

The FLLs in the WM8994 series devices can be started without any reference
being supplied, mainly for use in analogue bypass cases. Implement support
for this mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: ux500: Strengthen error checking after memory allocation

Currently there is no out-of-memory error checking after attempting
to allocate memory for the ux500_msp or ux500_msp_i2s_drvdata data
structures. Instead we go about populating them regardless. This
patch applies the necessary error checking to prevent a panic.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: omap-abe-twl6040: Add device tree support

When the board boots with device tree the driver will receive the name of the
card, DAPM routing map, phandle for the audio components described in the dts
file, mclk speed, and the possibility of detecting the jack detection.

The card will be set up based on this information.
Since the routing is provided via DT we can mark the card fully routed so
core can take care of disconnecting the unused pins.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: jack: Always update jack state even for noop changes

Now that DAPM is very cheap for most updates we've no need to avoid trying
to run it so always notify even if we don't think there are any changes.
This avoids potential issues with bootstrapping state like the pin state
or other notifiers when there's nothing in the jack.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: wm_hubs: Move CODEC stored in private data into wm_hubs

Further wm_hubs code will use this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm8994: Ensure we get a notification on startup for jackdet

Since jackdet only reports deltas it won't generate an interrupt on startup
when a jack is not present. This doesn't make a difference to userspace
but does mean we don't generate a notification via the internal notifier
chains. Fix that by scheduling a work to poll the chip after the clock is
enabled. Use an extremely large timeout since there's no urgency and we
don't want to report a false negative.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm_hubs: Factor out DC servo readback code

It's currently only used in one place but another user will be added
shortly and there's an argument it's clearer anyway.

Also add support for readback in mode 1, though it's not currently used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm_hubs: Rename calibrate_dc_servo()

Really we're enabling it here and the name will become very confusing
shortly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm8994: Fix some indentation issues

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: ab8500: Remove pointless cast

There's never any need to cast away from void.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
ASoC: wm8994: enable mic and short detect debounce.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: add DT bindings for cs4270

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Add reset-gpio DT property to cs4270 driver

In the process of moving over from static board files to the device
tree, reset pins of peripheral reset pins should be handled by their
corresponding drivers.

Add a reset-gpio DT property to the cs4270 driver, and de-assert it
before probing the chip. The logic could be augmented some day to
re-assert it when codec is put to suspend.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: imx-ssi: Use devm functions

Using devm_ functions can make the code simpler and smaller.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm9712: Fix funky indentation

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm9712: Fix name of Capture Switch

Help UIs associate it with the matching gain control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>