diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-11-19 16:21:04 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-11-30 17:36:36 +0100 |
commit | 0aa42370084cb8c87f5485e04bee50612d4db644 (patch) | |
tree | 7eb11050d96f1d48540bd5c23fce6f55a46b6d9a /drivers/gpio/gpio-xra1403.c | |
parent | 7d3615ae401146ab40115546667e8ebc0d5c7d73 (diff) | |
download | lwn-0aa42370084cb8c87f5485e04bee50612d4db644.tar.gz lwn-0aa42370084cb8c87f5485e04bee50612d4db644.zip |
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>
Diffstat (limited to 'drivers/gpio/gpio-xra1403.c')
-rw-r--r-- | drivers/gpio/gpio-xra1403.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-xra1403.c b/drivers/gpio/gpio-xra1403.c index e2cac12092af..49c878cfd5c6 100644 --- a/drivers/gpio/gpio-xra1403.c +++ b/drivers/gpio/gpio-xra1403.c @@ -186,15 +186,7 @@ static int xra1403_probe(struct spi_device *spi) return ret; } - ret = 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; + return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra); } static const struct spi_device_id xra1403_ids[] = { |