spi: spi-gpio: Remove set but not used variable 'pdata'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 6 Sep 2018 01:38:45 +0000 (01:38 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 6 Sep 2018 10:35:11 +0000 (11:35 +0100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/spi/spi-gpio.c: In function 'spi_gpio_remove':
drivers/spi/spi-gpio.c:450:33: warning:
 variable 'pdata' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-gpio.c

index 0626e6e..d0c6d71 100644 (file)
@@ -447,10 +447,8 @@ static int spi_gpio_probe(struct platform_device *pdev)
 static int spi_gpio_remove(struct platform_device *pdev)
 {
        struct spi_gpio                 *spi_gpio;
-       struct spi_gpio_platform_data   *pdata;
 
        spi_gpio = platform_get_drvdata(pdev);
-       pdata = dev_get_platdata(&pdev->dev);
 
        /* stop() unregisters child devices too */
        spi_bitbang_stop(&spi_gpio->bitbang);