Input: ad7879 - make sure we set up drvdata
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 28 Feb 2017 21:57:21 +0000 (13:57 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Mar 2017 17:42:43 +0000 (09:42 -0800)
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>
drivers/input/touchscreen/ad7879-spi.c
drivers/input/touchscreen/ad7879.c

index c73798297b98f9349c5151c9c2d40742c2c0ebf1..59486ccba37d7b0e6aab5a3ff48dc83ff19dbf43 100644 (file)
@@ -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;
 }
 
index 1bd870277e1a18bda3c887977f8880de58160885..52daaa4edc67f5b9af3da78b459fc41e8c64df89 100644 (file)
@@ -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);