浏览代码

Input: ad7879 - make sure we set up drvdata

The conversion to devm accidentally removed setting up of I2C client data
upon successful probe of the touchscreen. Let's move this setting into the
core, so we do not forger about it again.

Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces")
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov 8 年之前
父节点
当前提交
af160c542e
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 0 2
      drivers/input/touchscreen/ad7879-spi.c
  2. 2 0
      drivers/input/touchscreen/ad7879.c

+ 0 - 2
drivers/input/touchscreen/ad7879-spi.c

@@ -49,8 +49,6 @@ static int ad7879_spi_probe(struct spi_device *spi)
 	if (IS_ERR(ts))
 		return PTR_ERR(ts);
 
-	spi_set_drvdata(spi, ts);
-
 	return 0;
 }
 

+ 2 - 0
drivers/input/touchscreen/ad7879.c

@@ -680,6 +680,8 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap,
 	if (err)
 		return ERR_PTR(err);
 
+	dev_set_drvdata(dev, ts);
+
 	return 0;
 }
 EXPORT_SYMBOL(ad7879_probe);