The patch titled drivers/input/touchscreen/ads7846.c: optimize order of calculating Rt in ads7846_rx() has been removed from the -mm tree. Its filename was drivers-input-touchscreen-ads7846c-optimize-order-of-calculating-rt-in-ads7846_rx.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/input/touchscreen/ads7846.c: optimize order of calculating Rt in ads7846_rx() From: Hans-Christian Egtvedt <hans-christian.egtvedt@xxxxxxxxx> Alter the if expression for calculating Rt. The old implementation would run unnecessary code when the ADS7843 device was used. The patch also fixes the code style to kernel standard. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@xxxxxxxxx> Cc: Dmitry Torokhov <dtor@xxxxxxx> Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: Imre Deak <imre.deak@xxxxxxxxxxxxx> Cc: Semih Hazar <semih.hazar@xxxxxxxxxxx> Cc: Juha Yrjola <juha.yrjola@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/input/touchscreen/ads7846.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN drivers/input/touchscreen/ads7846.c~drivers-input-touchscreen-ads7846c-optimize-order-of-calculating-rt-in-ads7846_rx drivers/input/touchscreen/ads7846.c --- a/drivers/input/touchscreen/ads7846.c~drivers-input-touchscreen-ads7846c-optimize-order-of-calculating-rt-in-ads7846_rx +++ a/drivers/input/touchscreen/ads7846.c @@ -517,7 +517,9 @@ static void ads7846_rx(void *ads) if (x == MAX_12BIT) x = 0; - if (likely(x && z1)) { + if (ts->model == 7843) { + Rt = ts->pressure_max / 2; + } else if (likely(x && z1)) { /* compute touch pressure resistance using equation #2 */ Rt = z2; Rt -= z1; @@ -525,11 +527,9 @@ static void ads7846_rx(void *ads) Rt *= ts->x_plate_ohms; Rt /= z1; Rt = (Rt + 2047) >> 12; - } else + } else { Rt = 0; - - if (ts->model == 7843) - Rt = ts->pressure_max / 2; + } /* Sample found inconsistent by debouncing or pressure is beyond * the maximum. Don't report it to user space, repeat at least _ Patches currently in -mm which might be from hans-christian.egtvedt@xxxxxxxxx are origin.patch atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock.patch fbdev-lcd-backlight-driver-using-atmel-pwm-driver.patch git-input.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html