From: 黄涛 Date: Tue, 8 Jun 2010 08:03:33 +0000 (+0000) Subject: fix rk2818_spim_suspend X-Git-Tag: firefly_0821_release~11405 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=724b25b7c31e974fb7f04a3e0f738cb22a33f40a;p=firefly-linux-kernel-4.4.55.git fix rk2818_spim_suspend --- diff --git a/drivers/spi/rk2818_spim.c b/drivers/spi/rk2818_spim.c index 7cb074fea0e0..73c74213773a 100644 --- a/drivers/spi/rk2818_spim.c +++ b/drivers/spi/rk2818_spim.c @@ -988,10 +988,16 @@ static void __exit rk2818_spim_remove(struct platform_device *pdev) static int rk2818_spim_suspend(struct platform_device *pdev, pm_message_t mesg) { - struct spi_master *master = platform_get_drvdata(pdev); - struct rk2818_spi *dws = spi_master_get_devdata(master); - clk_disable(dws->clock_spim); - return 0; + struct spi_master *master = platform_get_drvdata(pdev); + struct rk2818_spi *dws = spi_master_get_devdata(master); + int status; + + status = stop_queue(dws); + if (status != 0) + return status; + clk_disable(dws->clock_spim); + + return 0; } static int rk2818_spim_resume(struct platform_device *pdev)