--- 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
--- 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)
--- 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]);
/*
--- 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);
--- 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);
--- 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);