ARM: S5PV210: fix unused LDO supply field from wm8994_pdata

According to commit 719a4240("mfd: Remove unused LDO supply field
from WM8994 pdata"), the LDO supply field should be removed from
the initializer.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: EXYNOS: Add missing definition for IRQ_I2S0

This fixes following build error when sound support is selected
on EXYNOS4 platform.

sound/soc/samsung/idma.c: In function ‘idma_close’:
sound/soc/samsung/idma.c:327:11: error: ‘IRQ_I2S0’ undeclared (first use in this function)

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c

This patch is omitted in v2 patch of Jaecheol Lee.

drivers/cpufreq/exynos5250-cpufreq.c: In function 'set_clkdiv':
drivers/cpufreq/exynos5250-cpufreq.c:144: error: 'EXYNOS5_CLKDIV_STATCPU0' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:144: error: (Each undeclared identifier is reported only once
drivers/cpufreq/exynos5250-cpufreq.c:144: error: for each function it appears in.)
drivers/cpufreq/exynos5250-cpufreq.c:150: error: 'EXYNOS5_CLKDIV_CPU1' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:152: error: 'EXYNOS5_CLKDIV_STATCPU1' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c: In function 'set_apll':
drivers/cpufreq/exynos5250-cpufreq.c:166: error: 'EXYNOS5_CLKMUX_STATCPU' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:173: error: 'EXYNOS5_APLL_LOCK' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c: In function 'exynos5250_cpufreq_init':
drivers/cpufreq/exynos5250-cpufreq.c:312: error: 'EXYNOS5_CLKDIV_CPU1' undeclared (first use in this function)

Cc: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented

commit 8878a539ff19a43cf3729e7562cd528f490246ae was done by me
to make the page fault handler retryable as well as interruptible.

Due to this commit, there is a mistake in the way in which
tsk->[maj|min]_flt counter gets incremented for VM_FAULT_ERROR:
If VM_FAULT_ERROR is returned in the fault flags by handle_mm_fault,
then either maj_flt or min_flt will get incremented. This is wrong
as in the case of a VM_FAULT_ERROR we need to be skip ahead to the
error handling code in do_page_fault.

Added a check after the call to __do_page_fault() to check for
(fault & VM_FAULT_ERROR).

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler

handle_IRQ may briefly cause interrupts to be re-enabled during soft IRQ
processing on the exit path, leading to nested handling of VIC interrupts.

Since the current code does not re-read the VIC_IRQ_STATUS register, this
can lead to multiple invocations of the same interrupt handler and
spurious interrupts to be reported.

This patch changes the VIC interrupt dispatching code to re-read the
status register each time, avoiding duplicate invocations of the same
handler.

Acked-and-Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: S5PV210: Fix compiler warning in dma.c file

Fixes the following warning:

warning: 'dma_dmamask' defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: EXYNOS: Add PDMA and MDMA physical base address defines

Add PDMA and MDMA physical base address macros which is
require for EXYNOS5 of_dev_auxdata setup.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
[kgene.kim@samsung.com: changed dma channel fo mdma1]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ALSA: hda/realtek - Add a few ALC882 model strings back

Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co

Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G

It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines

A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine.  Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option.  All Mac machines are now explicitly
handled with a quirk and the auto-parser.  This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).

In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory when badness is negative.

While I was there I also noticed some trailing whitespace in the
function that I removed (along with all other trailing whitespace in
the file) - it didn't seem worth-while to do that as two patches, so I
hope it's OK that I just did it all as one patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ARM: 7366/3: amba: Remove AMBA level regulator support

The AMBA bus regulator support is being used to model on/off switches
for power domains which isn't terribly idiomatic for modern kernels with
the generic power domain code and creates integration problems on platforms
which don't use regulators for their power domains as it's hard to tell
the difference between a regulator that is needed but failed to be provided
and one that isn't supposed to be there (though DT does make that easier).

Platforms that wish to use the regulator API to manage their power domains
can indirect via the power domain interface.

This feature is only used with the vape supply of the db8500 PRCMU
driver which supplies the UARTs and MMC controllers, none of which have
support for managing vcore at runtime in mainline (only pl022 SPI
controller does).  Update that supply to have an always_on constraint
until the power domain support for the system is updated so that it is
enabled for these users, this is likely to have no impact on practical
systems as probably at least one of these devices will be active and
cause AMBA to hold the supply on anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7379/1: DT: fix atags_to_fdt() second call site

atags_to_fdt() returns 1 when it fails to find a valid FDT signature.
The CONFIG_ARM_ATAG_DTB_COMPAT code is supposed to retry with another
location, but only does so when the initial call doesn't fail.

Fix this by using the correct condition in the assembly code.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7380/1: DT: do not add a zero-sized memory property

Some bootloaders are broken enough to expose an ATAG_MEM with
a null size. Converting such tag to a memory node leads to
an unbootable system.

Skip over zero sized ATAG_MEM to avoid this situation.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7381/1: nommu: fix typo in mm/Kconfig

The description for the CPU_HIGH_VECTOR Kconfig option for nommu builds
doesn't make any sense.

This patch fixes up the trivial grammatical error.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7383/1: nommu: populate vectors page from paging_init

Commit 94e5a85b ("ARM: earlier initialization of vectors page") made it
the responsibility of paging_init to initialise the vectors page.

This patch adds a call to early_trap_init for the !CONFIG_MMU case,
placing the vectors at CONFIG_VECTORS_BASE.

Cc: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arm: msm: halibut: remove unneeded fixup

This old fixup causes a build failure, so I remove it just like in
trout.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
arm: msm: trout: fix compile failure

Fixes the following warnings,

arch/arm/mach-msm/board-trout.c: In function 'trout_init':
arch/arm/mach-msm/board-trout.c:71: error: 'system_rev' undeclared (first use in this function)
arch/arm/mach-msm/board-trout.c:71: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-trout.c:71: error: for each function it appears in.)

and

arch/arm/mach-msm/board-trout-panel.c: In function 'trout_init_panel':
arch/arm/mach-msm/board-trout-panel.c:267: error: 'system_rev' undeclared (first use in this function)
arch/arm/mach-msm/board-trout-panel.c:267: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-trout-panel.c:267: error: for each function it appears in.)

This came in with the following commit 9f97da78bf018206fb623cd351d454af2f105fe0
which removes asm/system.h

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
cc: David Howells <dhowells@redhat.com>
cc: Bryan Huntsman <bryanh@codeaurora.org>
cc: linux-arm-msm@vger.kernel.org
cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: David Brown <davidb@codeaurora.org>
video: msm: Fix section mismatches in mddi.c

The change
    commit 461cbe77d0a4f887c33a3a95ea68a7daf23b4302
    Author: Gregory Bean <gbean@codeaurora.org>
    Date:   Wed Jul 28 10:22:13 2010 -0700

        video: msm: Fix section mismatch in mddi.c.

fixes a section mismatch between the board file and the driver's probe
function, however, it misses the additional mismatches between the
probe function and some routines it calls.  Fix these up as well.

Signed-off-by: David Brown <davidb@codeaurora.org>