scripts: gcc-wrapper: Add exceptions for failures with gcc-4.6.3

Compiling the kernel with gcc-4.6.3 generates two new forbidden
warnings. Adding them to the allowed warnings list.

Warning 1:
kernel/arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be
used uninitialized in this function [-Wuninitialized]

Warning 2:
kernel/net/sched/sch_generic.c:678:2: warning: the comparison will always
evaluate as 'true' for the address of 'noop_qdisc' will never be NULL
[-Waddress]

Change-Id: Ib559420337ac4c2d25b55eb80e8da3c2221b2f75
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
scripts: gcc-wrapper: Add exceptions for netfilter failures with gcc-4.6.3

Compiling the kernel with gcc-4.6.3 generates multiple forbidden
warnings for netfilter. Adding them to the allowed warnings list.

Change-Id: I7214d8c1bb59c99e2422eaac2a820fb43cf62b1e
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
scripts: gcc-wrapper: Add an allowed warning for block.c

Commit f2b3f49ede3be96e11b60880c22a768328ce4d2f added a warning
from Open Emdedded's gcc-4.6.3 compiler.

| kernel/drivers/mmc/card/block.c: In function 'mmc_blk_issue_rq':
| kernel/drivers/mmc/card/block.c:836:18:
| warning: 'arg' may be used uninitialized in this function
| [-Wuninitialized] error, forbidden warning: block.c:836
| kernel/drivers/mmc/card/block.c:835:6: warning: 'nr' may be used
| uninitialized in this function [-Wuninitialized]
| error, forbidden warning: block.c:835

Change-Id: I05a45033e5dae8b126cbbba89188d84244485afd
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
checkpatch: Check for unsafe string functions

There are many string based functions that are unsafe
to use. Some of the functions are unsafe to use because
of the possibility of overflow while others cannot
guarantee that the resultant string is NULL-terminated.

Add check for these functions and log message indicating
which safe functions can be used instead.

Change-Id: Id305d98df241e3fd257529529739dcd4f3659186
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
ARM: 7324/1: modpost: Fix section warnings for ARM for many compilers

It turns out that many compilers don't show section warnings on ARM
currently because handling for ARM_CALL relocs are missing from
modpost.c.

Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when
loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and
R_ARM_JUMP24 can be handled the same way.

Note that at least Debian libc6-dev is missing defines for both
R_ARM_CALL and R_ARM_JUMP24 in /usr/include/elf.h. So for now
we need to define them in modpost.c if not defined.

Change-Id: Ib059548c9725885ebdc0db6b7844e407ff012dec
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Anders Kaseorg <andersk@ksplice.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: qdsp6v2: ultrasound: extend the USF API to support new UI in ICS.

The extended API provides the USF driver with information,
required to support the following Android 4.0 UI features:
stylus input, hovering events.
The information is generated by userland based events calculators.

Change-Id: Ic6618e99228c24ae79c04787a6e034cd2f8d8cf7
Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
msm: ultrasound: control events from devices, conflicting with the USF.

In some UI frameworks there is no way to support
simultaneous digital pen and TSC input devices.
The acceptable solution is to disable the TSC
when the pen is close or touches the screen.
The USF can filter input events (e.g. TSC), produced by any driver.
This filtering is controlled by userland based events calculators.

Change-Id: If73adc8cb6039b037cb6a4aea148ac3326889f3c
Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
msm: ultrasound: enable interrupting of long-time IOCTLs.

Some USF driver's IOCTLs are blocked for time, configurable by
a caller. Possible issue is the driver release while
blocked IOCTL fulfilling.
To resolve this issue non-interruptible wait_event_*()
functions are replaced by their interruptible peers.

Change-Id: I723f3a950e578f5c0e2d8dd4063eadd9bdee6971
Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
Revert "ARM: 7324/1: modpost: Fix section warnings for ARM for many compilers"

This reverts commit 5f7062b9941a3154900f282989143ffb3e0f7884.
Revert "checkpatch: Check for unsafe string functions"

This reverts commit 6d032a0f85963987c0407f3696b994d0ed818180.
Revert "scripts: gcc-wrapper: Add an allowed warning for block.c"

This reverts commit f484c704c5265d98ee332008256011d11afb6646.
Revert "scripts: gcc-wrapper: Add exceptions for netfilter failures with gcc-4.6.3"

This reverts commit 6a289e21490001b8157ab2265b643e619a5e1ce4.
Revert "scripts: gcc-wrapper: Add exceptions for failures with gcc-4.6.3"

This reverts commit a022f5f94a0ebe8b7a283876c002ff0c96bee6f0.
ASoC: msm: change clk_get() to clk_get_sys() for Audiodrivers in 8660

Impact:
clk_get() expects the device information as the first parameter to
while assigning the clock.

Problem:
All the sound devices use the same interface clock. The ids of these
devices may vary depending on the target used ( ffa, surf, fluid etc)
as they are dynamically assigned in msm_snddev_init.
So, it is not possible to provide the device id for clk_get().

Change:
clk_get_sys() is used instead of clk_get() for 8660 targets.
clk_get_sys() is a drop-in replacement for clk_get() except it does
not take a device pointer as an argument. Instead, it takes an
arbitrary string that is matched against the right-most column in
the clock table.

Change-Id: I71d1e60ae3b1f958548565e749e9304c7a4e86f7
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
msm: ultrasound: multi input devices support.

User space based UI framework enables additional configuration
of input devices  along with configuration in the proper kernel drivers.
To use this capability in the ultrasound framework,
the USF driver should simulate multiple input devices:
one device for each input event type.

Change-Id: Idd6aad0814ea57796ab789758fd28ae46d6e9d8a
Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
(cherry picked from commit cf5a4d187c5daa214149eb74ee925a1e8c6b2b05)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm: audio: qdsp6v2: Resolve panic for voip call scenario

- While in a voip call, when receive another voip call
observe kernel panic in voice cal API.
- In this second call, even though first voip call
deregister memory but acdb block cal sizes are not
reset leading to overflow in size and panic at memcpy
in voice calibration API.
- While deregister memory in ACDB, reset the ACDB cal
sizes of all blocks to zero.

Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit a27992bc5c50d83d905c11058628d9153505f4bf)

Change-Id: I2890196cee73efc3279496f5e843888722d3642e
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: ultrasound: support new devices, conflicting with the USF.

Some new TSC drivers advertise themselves by using
ABS_MT_POSITION_* bits instead of ABS_*.
This change supports TSC drivers, using
ABS_MT_POSITION_* and/or ABS_* bits.

Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
(cherry picked from commit 32b44a2ba35140db02bc9f24d17f3943ee48a6f0)

Change-Id: I7378aabaeecf55704b6425965d743599d250024d
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: audio: qdsp6v2: Fix WMV stream resume issue

- Suspend phone while WMV clip playback is going on.
Resume it, clip fails to play.
- At resume of WMV clip, Pause is issued initially
to driver. But there is a bug in pause API which is
not returning appropriate result. OMX component when
starts playback, it now issues resume to driver and
driver is setting DSP to run state even before ENC_DEC
params are set.
- Fix pause code to return error value if driver is not
enabled. This will avoid driver in sending CMD_RUN
before ENC_DEC command.

CRs-Fixed: 394756
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit 92ad28cd56803b451ae4bde72bfd20021c769649)

Change-Id: I2fe6ad625e35b50eb3b334165c8484061b40d343
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm: audio: qdsp6v2: Add RTAC voice lookup by CVP or CVS handle

Add functionality to look up RTAC voice structures by CVP
handle or CVS handle. The CVP ioctls now expect the CVP
handle to be sent instead of the CVS handle.

CRs-fixed: 397348
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp6v2/rtac.c

Change-Id: I6bcb6d56483316c6fd0cbf5c39fa930b56e2f22d
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
ASoC: msm: Add support for stubbed hostless voice driver.

Stubbed hostless voice driver added to support use cases where
APQ QDSP6 voice module is not needed for voice calls.

Change-Id: I676726e6c704f1ee4cb078ed1b475a38afb8dc12
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>

Conflicts:
	sound/soc/msm/msm-pcm-routing.c