Nov. 8th, 2010 09:22 pm
In which HTC Just Doesn't Get It
(in htc_battery.c):
There are so many things wrong with this. How many can you find?
static void update_wake_lock(int status)
{
if (status == CHARGER_USB) {
wake_lock(&vbus_wake_lock);
} else if (__htc_power_policy()) {
/* Lock suspend for DOPOD charging animation */
wake_lock(&vbus_wake_lock);
} else {
/* give userspace some time to see the uevent and update
* LED state or whatnot...
*/
wake_lock_timeout(&vbus_wake_lock, HZ * 5);
}
}There are so many things wrong with this. How many can you find?