Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: topcliff-pch: fix controller deregistration

Make sure to deregister the controller before disabling and releasing
underlying resources like interrupts and DMA during driver unbind.

Fixes: e8b17b5b3f30 ("spi/topcliff: Add topcliff platform controller hub (PCH) spi bus driver")
Cc: stable@vger.kernel.org # 2.6.37
Cc: Masayuki Ohtake <masa-korg@dsn.okisemi.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
5d6f477d 220f4f11

+6 -1
+6 -1
drivers/spi/spi-topcliff-pch.c
··· 1406 1406 dev_dbg(&plat_dev->dev, "%s:[ch%d] irq=%d\n", 1407 1407 __func__, plat_dev->id, board_dat->pdev->irq); 1408 1408 1409 + spi_controller_get(data->host); 1410 + 1411 + spi_unregister_controller(data->host); 1412 + 1409 1413 if (use_dma) 1410 1414 pch_free_dma_buf(board_dat, data); 1411 1415 ··· 1437 1433 } 1438 1434 1439 1435 pci_iounmap(board_dat->pdev, data->io_remap_addr); 1440 - spi_unregister_controller(data->host); 1436 + 1437 + spi_controller_put(data->host); 1441 1438 } 1442 1439 #ifdef CONFIG_PM 1443 1440 static int pch_spi_pd_suspend(struct platform_device *pd_dev,