Skip to contentSkip to conversation

Input: tps6507x-ts - add missing platform_set_drvdata() in tps6507x_ts_probe()

PATCH Applied Axel Lin 2 participants 2 messages Sep 2, 2010

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

We call platform_get_drvdata() in tps6507x_ts_remove(), thus we should call platform_set_drvdata() in tps6507x_ts_probe().

---
 drivers/input/touchscreen/tps6507x-ts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/touchscreen/tps6507x-ts.c +1 -0
index a644d18..7286209 100644
@@ -335,6 +335,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
 		dev_err(tsc->dev, "schedule failed");
 		goto err2;
 	 }
+	platform_set_drvdata(pdev, tps6507x_dev);
 
 	return 0;
 
Signature · 1 line
1.7.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Axel Lin

We call platform_get_drvdata() in tps6507x_ts_remove(), thus we should call platform_set_drvdata() in tps6507x_ts_probe().

Applied, thanks Axel.

Quoted 21 lines
---
 drivers/input/touchscreen/tps6507x-ts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/touchscreen/tps6507x-ts.c +1 -0
index a644d18..7286209 100644
@@ -335,6 +335,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
 		dev_err(tsc->dev, "schedule failed");
 		goto err2;
 	 }
+	platform_set_drvdata(pdev, tps6507x_dev);
 
 	return 0;
 
Signature · 1 line
1.7.2
Signature · 1 line
Dmitry