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>
tools/virtio: fix up vhost/test module build

commit ea5d404655ba3b356d0c06d6a3c4f24112124522
broke build for the vhost test module used
by tools/virtio. Fix it up.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio_blk: helper function to format disk names

The current virtio block's naming algorithm just supports 18278
(26^3 + 26^2 + 26) disks. If there are more virtio blocks,
there will be disks with the same name.

Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, add
a function "virtblk_name_format()" for virtio block to support mass
of disks naming.

Notes:
- Our naming scheme is ugly. We are stuck with it
  for virtio but don't use it for any new driver:
  new drivers should name their devices PREFIX%d
  where the sequence number can be allocated by ida
- sd_format_disk_name has exactly the same logic.
  Moving it to a central place was deferred over worries
  that this will make people keep using the legacy naming
  in new drivers.
  We kept code idential in case someone wants to deduplicate later.

Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
Acked-by: Asias He <asias@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
perf session: Skip event correctly for unknown id/machine

In case the perf_session__process_event function fails, we estimate the
next event offset.

This is not necessary for sample event failing on unknown ID or machine.
In such case we know proper size of the event, so we dont need to guess.
Also failure statistics are updated correctly so we don't miss any
information.

Forcing perf_session__process_event to return 0 in case of unknown ID or
machine.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1334233262-5679-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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>
perf tools: fix NO_GTK2 Makefile config error

In case the user specified NO_GTK2 on the make cmdline, compilation
would fail with undefined symbol because the Makefile would not set the
correct cpp variable: NO_GTK2 vs. NO_GTK2_SUPPORT.

This patch renames the variable to the correct name.

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120410103513.GA9229@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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>