]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: hisi-kunpeng: Fixed the wrong debugfs node name in hisi_spi debugfs initialization
authorDevyn Liu <liudingyuan@h-partners.com>
Thu, 8 Jan 2026 07:53:23 +0000 (15:53 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 12 Jan 2026 11:20:43 +0000 (11:20 +0000)
commitb062a899c997df7b9ce29c62164888baa7a85833
treee976bc42cf6354f5192464037271d561999fb5f8
parent383d4f5cffcc8df930d95b06518a9d25a6d74aac
spi: hisi-kunpeng: Fixed the wrong debugfs node name in hisi_spi debugfs initialization

In hisi_spi_debugfs_init, spi controller pointer is calculated
by container_of macro, and the member is hs->dev. But the host
cannot be calculated offset directly by this. (hs->dev) points
to (pdev->dev), and it is the (host->dev.parent) rather than
(host->dev) points to the (pdev->dev), which is set in
__spi_alloc_controller.

In this patch, this issues is fixed by getting the spi_controller
data from pdev->dev by dev_get_drvdata() directly. (dev->driver_data)
points to the spi controller data in the probe stage.

Signed-off-by: Devyn Liu <liudingyuan@h-partners.com>
Reviewed-by: Yang Shen <shenyang39@huawei.com>
Link: https://patch.msgid.link/20260108075323.3831574-1-liudingyuan@h-partners.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-hisi-kunpeng.c