Code cleanups and stability fixes

file:64f6bc1a91326c79800bbb9205645a7d0e7e5e0c -> file:1e4cbd4e7be930f2515bece2a19c23f2f2a07845
--- a/arch/arm/lib/findbit.S
+++ b/arch/arm/lib/findbit.S
@@ -174,8 +174,8 @@ ENDPROC(_find_next_bit_be)
*/
.L_found:
#if __LINUX_ARM_ARCH__ >= 5
- rsb r0, r3, #0
- and r3, r3, r0
+ rsb r1, r3, #0
+ and r3, r3, r1
clz r3, r3
rsb r3, r3, #31
add r0, r2, r3
@@ -190,7 +190,5 @@ ENDPROC(_find_next_bit_be)
addeq r2, r2, #1
mov r0, r2
#endif
- cmp r1, r0 @ Clamp to maxbit
- movlo r0, r1
mov pc, lr
file:be18cf157afdd87f1cd2fd287161c90511026cda -> file:31658a5d398534e8b8254a1eaa12741f45a0da02
--- a/arch/arm/mach-msm/htc_battery.c
+++ b/arch/arm/mach-msm/htc_battery.c
@@ -30,8 +30,10 @@
#include <mach/msm_fb.h> /* Jay, to register display notifier */
#include <mach/htc_battery.h>
#include <linux/rtc.h>
+#ifdef CONFIG_MACH_SUPERSONIC
#include <linux/workqueue.h>
#include <linux/tps65200.h>
+#endif
#ifdef CONFIG_HTC_BATTCHG_SMEM
#include "smd_private.h"
#endif
@@ -1380,6 +1382,7 @@ dont_need_update:
return i;
}
+#ifdef CONFIG_MACH_SUPERSONIC
static irqreturn_t tps65200_int_detection(int irq, void *data)
{
struct htc_battery_tps65200_int *ip = data;
@@ -1462,6 +1465,7 @@ static void htc_battery_tps65200_int_fun
break;
}
}
+#endif
static int htc_battery_core_probe(struct platform_device *pdev)
{
@@ -1673,6 +1677,7 @@ static int htc_battery_probe(struct plat
ds2746_register_notifier(&ds2784_notifier);
#endif
+#ifdef CONFIG_MACH_SUPERSONIC
if (system_rev >= 1) {
if (pdata->int_data.chg_int) {
BATT_LOG("init over voltage interrupt detection.");
@@ -1691,8 +1696,8 @@ static int htc_battery_probe(struct plat
}
}
}
-
- return 0;
+#endif
+ return rc;
}
int get_cable_status(void)
file:169e66b677061072d07cd422bef753cd9e3948cf -> file:61afd458a7cfb1fec32614bbbdd14205b0d94240
--- a/drivers/input/touchscreen/atmel.c
+++ b/drivers/input/touchscreen/atmel.c
@@ -1151,9 +1151,9 @@ static int atmel_ts_probe(struct i2c_cli
BEGIN
*/
if(ts->id->family_id == 0x4F)
- pdata->config_T9[14] = 3;
- else
- pdata->config_T9[14] = 5;
+ pdata->config_T9[T9_CFG_NUMTOUCH] = 3;
+ else if (ts->id->family_id == 0x80)
+ pdata->config_T9[T9_CFG_NUMTOUCH] = 5;
printk(KERN_INFO "%d point multitouch enabled\n", pdata->config_T9[14]);
/*
file:ccff8c415bfbda9d0ea5f0763947ab23cf3d6fc4 -> file:1c26be4e9015bddcf04b0a70bd1f5415b9fe08ff
--- a/kernel/power/earlysuspend.c
+++ b/kernel/power/earlysuspend.c
@@ -38,6 +38,7 @@ static DECLARE_WORK(early_suspend_work,
static DECLARE_WORK(late_resume_work, late_resume);
static DEFINE_SPINLOCK(state_lock);
enum {
+ SUSPENDED_ON = 0x0,
SUSPEND_REQUESTED = 0x1,
SUSPENDED = 0x2,
SUSPEND_REQUESTED_AND_SUSPENDED = SUSPEND_REQUESTED | SUSPENDED,
@@ -136,8 +137,12 @@ static void late_resume(struct work_stru
pr_info("[R] late_resume start\n");
mutex_lock(&early_suspend_lock);
spin_lock_irqsave(&state_lock, irqflags);
- if (state == SUSPENDED)
+ if (state == SUSPENDED) {
state &= ~SUSPENDED;
+#ifdef CONFIG_HTC_ONMODE_CHARGING
+ state_onchg &= ~SUSPEND_REQUESTED_AND_SUSPENDED;
+#endif
+ }
else
abort = 1;
spin_unlock_irqrestore(&state_lock, irqflags);
file:b1353560e5f24bcc47e4173be3cefda9ca378227 -> file:bf0014d6a5f0972a1b2352d35a09eb82296164d1
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -137,7 +137,7 @@ static int snapshot_release(struct inode
free_all_swap_pages(data->swap);
if (data->frozen)
thaw_processes();
- pm_notifier_call_chain(data->mode == O_RDONLY ?
+ pm_notifier_call_chain(data->mode == O_WRONLY ?
PM_POST_HIBERNATION : PM_POST_RESTORE);
atomic_inc(&snapshot_device_available);
file:c292f67a551cd205905d635ec1cf2b31a5f4bd25 -> file:6d03db4590bbd1aeed8ef67ea71f1ab9e680ee78
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -351,6 +351,7 @@ void wake_lock_init(struct wake_lock *lo
if (name)
lock->name = name;
BUG_ON(!lock->name);
+ BUG_ON(lock->flags & WAKE_LOCK_INITIALIZED);
if (debug_mask & DEBUG_WAKE_LOCK)
pr_info("wake_lock_init name=%s\n", lock->name);