Commit 429ecbef authored by Mark Brown's avatar Mark Brown

spi: bcm63xx: Fix two bugs

Merge series from Jinjie Ruan <ruanjinjie@huawei.com>:

Fix module autoloading and missing pm_runtime_disable().
parents aa6e8296 26569728
...@@ -466,6 +466,7 @@ static const struct platform_device_id bcm63xx_spi_dev_match[] = { ...@@ -466,6 +466,7 @@ static const struct platform_device_id bcm63xx_spi_dev_match[] = {
{ {
}, },
}; };
MODULE_DEVICE_TABLE(platform, bcm63xx_spi_dev_match);
static const struct of_device_id bcm63xx_spi_of_match[] = { static const struct of_device_id bcm63xx_spi_of_match[] = {
{ .compatible = "brcm,bcm6348-spi", .data = &bcm6348_spi_reg_offsets }, { .compatible = "brcm,bcm6348-spi", .data = &bcm6348_spi_reg_offsets },
...@@ -582,13 +583,15 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) ...@@ -582,13 +583,15 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS);
pm_runtime_enable(&pdev->dev); ret = devm_pm_runtime_enable(&pdev->dev);
if (ret)
goto out_clk_disable;
/* register and we are done */ /* register and we are done */
ret = devm_spi_register_controller(dev, host); ret = devm_spi_register_controller(dev, host);
if (ret) { if (ret) {
dev_err(dev, "spi register failed\n"); dev_err(dev, "spi register failed\n");
goto out_pm_disable; goto out_clk_disable;
} }
dev_info(dev, "at %pr (irq %d, FIFOs size %d)\n", dev_info(dev, "at %pr (irq %d, FIFOs size %d)\n",
...@@ -596,8 +599,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) ...@@ -596,8 +599,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
return 0; return 0;
out_pm_disable:
pm_runtime_disable(&pdev->dev);
out_clk_disable: out_clk_disable:
clk_disable_unprepare(clk); clk_disable_unprepare(clk);
out_err: out_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment