Re: [PATCH] spi: hisi-kunpeng: Fixed the wrong debugfs node name in hisi_spi debugfs initialization

From: Yang Shen
Date: Mon Nov 03 2025 - 06:09:59 EST




在 2025/10/24 14:31, Devyn Liu 写道:
In hisi_spi_debugfs_init, spi controller pointer is calculated by
container_of macro, and the member is hs->dev. But the host pointer cannot
be calculated offset directly by this, because hs->dev points to the
device in platform device(pdev->dev), and it is the host->dev.parent
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->driver_data directly, driver_data points to the spi
controller data in the probe stage.

Signed-off-by: Devyn Liu <liudingyuan@xxxxxxxxxxxxxx>
---
drivers/spi/spi-hisi-kunpeng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Yang Shen <shenyang39@xxxxxxxxxx>