summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/tps6507x-ts.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-04-15 11:01:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-25 09:47:02 -0700
commit02a71600df7805d80e4269684a75a0efc689657d (patch)
tree7e0d20c87eb90cb674ded737d563f7be93c93b7b /drivers/input/touchscreen/tps6507x-ts.c
parent04848ba829b3b740c7c9ae0c5916f90efaed0f5d (diff)
Input: tps6507x-ts - use bool for booleans
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/tps6507x-ts.c')
-rw-r--r--drivers/input/touchscreen/tps6507x-ts.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index 1fb397c42aa3..c981ccf8cf15 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -45,12 +45,12 @@ struct tps6507x_ts {
struct ts_event tc;
struct tps6507x_dev *mfd;
u16 model;
- unsigned pendown;
+ u16 min_pressure;
int irq;
void (*clear_penirq)(void);
unsigned long poll_period; /* ms */
- u16 min_pressure;
int vref; /* non-zero to leave vref on */
+ bool pendown;
};
static int tps6507x_read_u8(struct tps6507x_ts *tsc, u8 reg, u8 *data)
@@ -165,12 +165,12 @@ static void tps6507x_ts_handler(struct work_struct *work)
struct tps6507x_ts *tsc = container_of(work,
struct tps6507x_ts, work.work);
struct input_dev *input_dev = tsc->input_dev;
- int pendown;
+ bool pendown;
int schd;
s32 ret;
- ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
- &tsc->tc.pressure);
+ ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
+ &tsc->tc.pressure);
if (ret)
goto done;
@@ -181,7 +181,7 @@ static void tps6507x_ts_handler(struct work_struct *work)
input_report_key(input_dev, BTN_TOUCH, 0);
input_report_abs(input_dev, ABS_PRESSURE, 0);
input_sync(input_dev);
- tsc->pendown = 0;
+ tsc->pendown = false;
}
if (pendown) {
@@ -206,7 +206,7 @@ static void tps6507x_ts_handler(struct work_struct *work)
input_report_abs(input_dev, ABS_Y, tsc->tc.y);
input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure);
input_sync(input_dev);
- tsc->pendown = 1;
+ tsc->pendown = true;
}
done: