Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: tps6507x-ts - use bool for booleans

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+7 -7
+7 -7
drivers/input/touchscreen/tps6507x-ts.c
··· 45 45 struct ts_event tc; 46 46 struct tps6507x_dev *mfd; 47 47 u16 model; 48 - unsigned pendown; 48 + u16 min_pressure; 49 49 int irq; 50 50 void (*clear_penirq)(void); 51 51 unsigned long poll_period; /* ms */ 52 - u16 min_pressure; 53 52 int vref; /* non-zero to leave vref on */ 53 + bool pendown; 54 54 }; 55 55 56 56 static int tps6507x_read_u8(struct tps6507x_ts *tsc, u8 reg, u8 *data) ··· 165 165 struct tps6507x_ts *tsc = container_of(work, 166 166 struct tps6507x_ts, work.work); 167 167 struct input_dev *input_dev = tsc->input_dev; 168 - int pendown; 168 + bool pendown; 169 169 int schd; 170 170 s32 ret; 171 171 172 - ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE, 173 - &tsc->tc.pressure); 172 + ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE, 173 + &tsc->tc.pressure); 174 174 if (ret) 175 175 goto done; 176 176 ··· 181 181 input_report_key(input_dev, BTN_TOUCH, 0); 182 182 input_report_abs(input_dev, ABS_PRESSURE, 0); 183 183 input_sync(input_dev); 184 - tsc->pendown = 0; 184 + tsc->pendown = false; 185 185 } 186 186 187 187 if (pendown) { ··· 206 206 input_report_abs(input_dev, ABS_Y, tsc->tc.y); 207 207 input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure); 208 208 input_sync(input_dev); 209 - tsc->pendown = 1; 209 + tsc->pendown = true; 210 210 } 211 211 212 212 done: