mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drivers: spi: remove spi_master_put() in probe
Currently the spi_master is allocated by devm_spi_alloc_master()
in the spi slave. so there is no need to call spi_master
put again this fixes the probe failure seen in spi slave
driver
Bug 4537830
Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ie0ea17c308caade7c0a1f298c7ac4f3b86a38541
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095347
(cherry picked from commit 3584ef129e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111547
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6997999d7a
commit
51806fef24
@@ -2026,7 +2026,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Slave Ready GPIO is unusable as it can sleep\n");
|
"Slave Ready GPIO is unusable as it can sleep\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto exit_free_master;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
tspi->slave_ready_active_high = pdata->slave_ready_active_high;
|
tspi->slave_ready_active_high = pdata->slave_ready_active_high;
|
||||||
@@ -2044,7 +2044,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
|
|||||||
if (!r) {
|
if (!r) {
|
||||||
dev_err(&pdev->dev, "No IO memory resource\n");
|
dev_err(&pdev->dev, "No IO memory resource\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto exit_free_master;
|
return ret;
|
||||||
}
|
}
|
||||||
tspi->phys = r->start;
|
tspi->phys = r->start;
|
||||||
tspi->base = devm_ioremap_resource(&pdev->dev, r);
|
tspi->base = devm_ioremap_resource(&pdev->dev, r);
|
||||||
@@ -2052,7 +2052,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Cannot request memregion/iomap dma address\n");
|
"Cannot request memregion/iomap dma address\n");
|
||||||
ret = PTR_ERR(tspi->base);
|
ret = PTR_ERR(tspi->base);
|
||||||
goto exit_free_master;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
tspi->rstc = devm_reset_control_get(&pdev->dev, "spi");
|
tspi->rstc = devm_reset_control_get(&pdev->dev, "spi");
|
||||||
@@ -2069,7 +2069,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&pdev->dev, "Failed to register ISR for IRQ %d\n",
|
dev_err(&pdev->dev, "Failed to register ISR for IRQ %d\n",
|
||||||
tspi->irq);
|
tspi->irq);
|
||||||
goto exit_free_master;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
tspi->clk = devm_clk_get(&pdev->dev, "spi");
|
tspi->clk = devm_clk_get(&pdev->dev, "spi");
|
||||||
@@ -2172,8 +2172,6 @@ exit_rx_dma_free:
|
|||||||
tegra_spi_deinit_dma_param(tspi, true);
|
tegra_spi_deinit_dma_param(tspi, true);
|
||||||
exit_free_irq:
|
exit_free_irq:
|
||||||
free_irq(spi_irq, tspi);
|
free_irq(spi_irq, tspi);
|
||||||
exit_free_master:
|
|
||||||
spi_master_put(controller);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user