summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-08-19 21:04:49 +0200
committerMark Brown <broonie@kernel.org>2024-08-19 21:04:49 +0200
commit429ecbef0d599cec66918d552a284b617f8724a4 (patch)
treec8d0f7d3e0ed9295d9fe9712fbde47fc29b5b667 /drivers/spi
parentspi: s3c64xx: Fix module autoloading (diff)
parentspi: bcm63xx: Fix missing pm_runtime_disable() (diff)
downloadlinux-429ecbef0d599cec66918d552a284b617f8724a4.tar.xz
linux-429ecbef0d599cec66918d552a284b617f8724a4.zip
spi: bcm63xx: Fix two bugs
Merge series from Jinjie Ruan <ruanjinjie@huawei.com>: Fix module autoloading and missing pm_runtime_disable().
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-bcm63xx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index aac41bd05f98..2fb79701a525 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -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[] = {
{ .compatible = "brcm,bcm6348-spi", .data = &bcm6348_spi_reg_offsets },
@@ -582,13 +583,15 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
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 */
ret = devm_spi_register_controller(dev, host);
if (ret) {
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",
@@ -596,8 +599,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
return 0;
-out_pm_disable:
- pm_runtime_disable(&pdev->dev);
out_clk_disable:
clk_disable_unprepare(clk);
out_err: