gpio: xra1403: remove unneeded spi_set_drvdata()
There is no matching spi_get_drvdata() call in the driver, so there is no need to do spi_set_drvdata(). This looks like it probably was copied from a driver that used both spi_set_drvdata() & spi_get_drvdata(). Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
7d3615ae40
commit
0aa4237008
@@ -186,15 +186,7 @@ static int xra1403_probe(struct spi_device *spi)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = devm_gpiochip_add_data(&spi->dev, &xra->chip, xra);
|
return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra);
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(&spi->dev, "Unable to register gpiochip\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
spi_set_drvdata(spi, xra);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct spi_device_id xra1403_ids[] = {
|
static const struct spi_device_id xra1403_ids[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user