Commit 04848ba8 authored by Alan Cox's avatar Alan Cox Committed by Dmitry Torokhov

Input: tps6507x-ts - remove bogus unreachable code

tsc->polling is write only and the poll local is meaningless
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 41cc2aaf
...@@ -42,7 +42,6 @@ struct tps6507x_ts { ...@@ -42,7 +42,6 @@ struct tps6507x_ts {
struct device *dev; struct device *dev;
char phys[32]; char phys[32];
struct delayed_work work; struct delayed_work work;
unsigned polling; /* polling is active */
struct ts_event tc; struct ts_event tc;
struct tps6507x_dev *mfd; struct tps6507x_dev *mfd;
u16 model; u16 model;
...@@ -168,7 +167,6 @@ static void tps6507x_ts_handler(struct work_struct *work) ...@@ -168,7 +167,6 @@ static void tps6507x_ts_handler(struct work_struct *work)
struct input_dev *input_dev = tsc->input_dev; struct input_dev *input_dev = tsc->input_dev;
int pendown; int pendown;
int schd; int schd;
int poll = 0;
s32 ret; s32 ret;
ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE, ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
...@@ -209,24 +207,14 @@ static void tps6507x_ts_handler(struct work_struct *work) ...@@ -209,24 +207,14 @@ static void tps6507x_ts_handler(struct work_struct *work)
input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure); input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure);
input_sync(input_dev); input_sync(input_dev);
tsc->pendown = 1; tsc->pendown = 1;
poll = 1;
} }
done: done:
/* always poll if not using interrupts */ /* always poll if not using interrupts */
poll = 1; schd = schedule_delayed_work(&tsc->work,
msecs_to_jiffies(tsc->poll_period));
if (poll) { if (!schd)
schd = schedule_delayed_work(&tsc->work, dev_err(tsc->dev, "re-schedule failed");
msecs_to_jiffies(tsc->poll_period));
if (schd)
tsc->polling = 1;
else {
tsc->polling = 0;
dev_err(tsc->dev, "re-schedule failed");
}
} else
tsc->polling = 0;
ret = tps6507x_adc_standby(tsc); ret = tps6507x_adc_standby(tsc);
} }
...@@ -324,10 +312,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev) ...@@ -324,10 +312,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
schd = schedule_delayed_work(&tsc->work, schd = schedule_delayed_work(&tsc->work,
msecs_to_jiffies(tsc->poll_period)); msecs_to_jiffies(tsc->poll_period));
if (schd) if (!schd) {
tsc->polling = 1;
else {
tsc->polling = 0;
dev_err(tsc->dev, "schedule failed"); dev_err(tsc->dev, "schedule failed");
goto err2; goto err2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment