Thread (4 messages) 4 messages, 4 authors, 2016-11-23

[PATCH] Input: twl4030-vibra: remove legacy pdata support

flat view
STALE3614d

From: Nicolae Rosia <hidden>
Date: 2016-11-22 11:00:15
Also in: linux-omap
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Remove dead code since all users are device tree enabled.

Signed-off-by: Nicolae Rosia <redacted>
---
 drivers/input/misc/twl4030-vibra.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index caa5a62..5acc241 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -177,12 +177,8 @@ static int __maybe_unused twl4030_vibra_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
 			 twl4030_vibra_suspend, twl4030_vibra_resume);
 
-static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
-			      struct device_node *node)
+static bool twl4030_vibra_check_coexist(struct device_node *node)
 {
-	if (pdata && pdata->coexist)
-		return true;
-
 	node = of_find_node_by_name(node, "codec");
 	if (node) {
 		of_node_put(node);
@@ -194,13 +190,12 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
 
 static int twl4030_vibra_probe(struct platform_device *pdev)
 {
-	struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev);
 	struct device_node *twl4030_core_node = pdev->dev.parent->of_node;
 	struct vibra_info *info;
 	int ret;
 
-	if (!pdata && !twl4030_core_node) {
-		dev_dbg(&pdev->dev, "platform_data not available\n");
+	if (!twl4030_core_node) {
+		dev_err(&pdev->dev, "no DT info\n\n");
 		return -EINVAL;
 	}
 
@@ -209,7 +204,7 @@ static int twl4030_vibra_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	info->dev = &pdev->dev;
-	info->coexist = twl4030_vibra_check_coexist(pdata, twl4030_core_node);
+	info->coexist = twl4030_vibra_check_coexist(twl4030_core_node);
 	INIT_WORK(&info->play_work, vibra_play_work);
 
 	info->input_dev = devm_input_allocate_device(&pdev->dev);
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help