[V2,03/10] input: touchscreen: ili210x: Drop get_pendown_state
diff mbox series

Message ID 20181220204305.28807-4-marex@denx.de
State Superseded
Headers show
Series
  • input: touchscreen: ili210x: Add ILI2511 support
Related show

Commit Message

Marek Vasut Dec. 20, 2018, 8:42 p.m. UTC
The .get_pendown_state callback is set only by the platform data code,
which was just removed. Thus, get_pendown_state() always returns false,
so drop that altogether.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: Olivier Sobrie <olivier@sobrie.be>
Cc: Philipp Puschmann <pp@emlix.com>
To: linux-input@vger.kernel.org
---
V2: New patch
---
 drivers/input/touchscreen/ili210x.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index 25b0ca6c07d9..11007bf8113c 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -43,7 +43,6 @@  struct firmware_version {
 struct ili210x {
 	struct i2c_client *client;
 	struct input_dev *input;
-	bool (*get_pendown_state)(void);
 	unsigned int poll_period;
 	struct delayed_work dwork;
 };
@@ -102,16 +101,6 @@  static void ili210x_report_events(struct input_dev *input,
 	input_sync(input);
 }
 
-static bool get_pendown_state(const struct ili210x *priv)
-{
-	bool state = false;
-
-	if (priv->get_pendown_state)
-		state = priv->get_pendown_state();
-
-	return state;
-}
-
 static void ili210x_work(struct work_struct *work)
 {
 	struct ili210x *priv = container_of(work, struct ili210x,
@@ -130,7 +119,7 @@  static void ili210x_work(struct work_struct *work)
 
 	ili210x_report_events(priv->input, &touchdata);
 
-	if ((touchdata.status & 0xf3) || get_pendown_state(priv))
+	if (touchdata.status & 0xf3)
 		schedule_delayed_work(&priv->dwork,
 				      msecs_to_jiffies(priv->poll_period));
 }