mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
spi: rockchip-sfc: Fix error in remove progress
Fix error in remove progress: [ 43.026148] Call trace: [ 43.026370] klist_next+0x1c/0x1d4 [ 43.026671] device_for_each_child+0x48/0xac [ 43.027049] spi_unregister_controller+0x30/0x130 [ 43.027469] rockchip_sfc_remove+0x48/0x80 [spi_rockchip_sfc] [ 43.027986] platform_remove+0x3c/0x6c Change-Id: Ia930aa506837291c4bff39c9accb7df99cb9a10a Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -210,6 +210,7 @@ struct rockchip_sfc {
|
||||
u16 version;
|
||||
struct gpio_desc *rst_gpio;
|
||||
struct gpio_desc **cs_gpiods;
|
||||
struct spi_master *master;
|
||||
};
|
||||
|
||||
static int rockchip_sfc_reset(struct rockchip_sfc *sfc)
|
||||
@@ -887,6 +888,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
||||
|
||||
sfc = spi_master_get_devdata(master);
|
||||
sfc->dev = dev;
|
||||
sfc->master = master;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
sfc->regbase = devm_ioremap_resource(dev, res);
|
||||
@@ -1026,8 +1028,8 @@ err_hclk:
|
||||
|
||||
static int rockchip_sfc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct spi_master *master = platform_get_drvdata(pdev);
|
||||
struct rockchip_sfc *sfc = platform_get_drvdata(pdev);
|
||||
struct spi_master *master = sfc->master;
|
||||
|
||||
free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
|
||||
spi_unregister_master(master);
|
||||
|
||||
Reference in New Issue
Block a user