diff options
author | Mark Brown <broonie@kernel.org> | 2020-12-11 17:49:01 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-11 17:49:01 +0000 |
commit | 3e98a021cc85e7d52acdd1eae8a988e975ec5bf9 (patch) | |
tree | cecfac58b9550a602555a02a9d583ed0f3378b38 /drivers/spi/spi-gpio.c | |
parent | 58f7553fa424fd0fd74e8b796d50c66014cebebe (diff) | |
parent | 2fee9583198eb97b5351feda7bd825e0f778385c (diff) | |
download | linux-stable-3e98a021cc85e7d52acdd1eae8a988e975ec5bf9.tar.gz linux-stable-3e98a021cc85e7d52acdd1eae8a988e975ec5bf9.tar.bz2 linux-stable-3e98a021cc85e7d52acdd1eae8a988e975ec5bf9.zip |
Merge remote-tracking branch 'spi/for-5.11' into spi-next
Diffstat (limited to 'drivers/spi/spi-gpio.c')
-rw-r--r-- | drivers/spi/spi-gpio.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 7ceb0ba27b75..0584f4d2fde2 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -350,11 +350,6 @@ static int spi_gpio_probe_pdata(struct platform_device *pdev, return 0; } -static void spi_gpio_put(void *data) -{ - spi_master_put(data); -} - static int spi_gpio_probe(struct platform_device *pdev) { int status; @@ -363,16 +358,10 @@ static int spi_gpio_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct spi_bitbang *bb; - master = spi_alloc_master(dev, sizeof(*spi_gpio)); + master = devm_spi_alloc_master(dev, sizeof(*spi_gpio)); if (!master) return -ENOMEM; - status = devm_add_action_or_reset(&pdev->dev, spi_gpio_put, master); - if (status) { - spi_master_put(master); - return status; - } - if (pdev->dev.of_node) status = spi_gpio_probe_dt(pdev, master); else @@ -432,7 +421,7 @@ static int spi_gpio_probe(struct platform_device *pdev) if (status) return status; - return devm_spi_register_master(&pdev->dev, spi_master_get(master)); + return devm_spi_register_master(&pdev->dev, master); } MODULE_ALIAS("platform:" DRIVER_NAME); |