Unverified Commit 429ecbef authored by Mark Brown's avatar Mark Brown
Browse files

spi: bcm63xx: Fix two bugs

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

Fix module autoloading and missing pm_runtime_disable().
parents aa6e8296 26569728
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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: