Skip to contentSkip to conversation

Input: max11801_ts - drop call to input_set_drvdata()

PATCH In review Dmitry Torokhov 2 participants 3 messages Jan 22, 2017

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: max11801_ts - drop call to input_set_drvdata()

Nobody calls input_get_drvdata() so setting it is not required.

---
 drivers/input/touchscreen/max11801_ts.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/touchscreen/max11801_ts.c +0 -1
index d87b89da114e..a595ae5284e3 100644
@@ -199,7 +199,6 @@ static int max11801_ts_probe(struct i2c_client *client,
 	__set_bit(BTN_TOUCH, input_dev->keybit);
 	input_set_abs_params(input_dev, ABS_X, 0, MAX11801_MAX_X, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, MAX11801_MAX_Y, 0, 0);
-	input_set_drvdata(input_dev, data);
 
 	max11801_ts_phy_init(data);
 
Signature · 5 lines
2.11.0.483.g087da7b7c-goog


-- 
Dmitry
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dmitry Torokhov

Nobody calls input_get_drvdata() so setting it is not required.

Surprisingly, there is about a dozen of those. I'll send a series of coccinelle generated patches later.

Guenter

Quoted 17 lines
---
 drivers/input/touchscreen/max11801_ts.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/touchscreen/max11801_ts.c +0 -1
index d87b89da114e..a595ae5284e3 100644
@@ -199,7 +199,6 @@ static int max11801_ts_probe(struct i2c_client *client,
 	__set_bit(BTN_TOUCH, input_dev->keybit);
 	input_set_abs_params(input_dev, ABS_X, 0, MAX11801_MAX_X, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, MAX11801_MAX_Y, 0, 0);
-	input_set_drvdata(input_dev, data);
 
 	max11801_ts_phy_init(data);
 
author maintainer
#2 lore raw
Quoted 9 lines · Guenter Roeck
Quoted 3 lines · Dmitry Torokhov

Nobody calls input_get_drvdata() so setting it is not required.

Surprisingly, there is about a dozen of those. I'll send a series of coccinelle generated patches later.

Cool, thanks.

Quoted 21 lines

Guenter

Quoted 17 lines

---
drivers/input/touchscreen/max11801_ts.c | 1 -

1 file changed, 1 deletion(-)
drivers/input/touchscreen/max11801_ts.c +0 -1
index d87b89da114e..a595ae5284e3 100644
@@ -199,7 +199,6 @@ static int max11801_ts_probe(struct i2c_client *client,
 	__set_bit(BTN_TOUCH, input_dev->keybit);
 	input_set_abs_params(input_dev, ABS_X, 0, MAX11801_MAX_X, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, MAX11801_MAX_Y, 0, 0);
-	input_set_drvdata(input_dev, data);
 
 	max11801_ts_phy_init(data);
 
Signature · 1 line
Dmitry