fix rk2818_spim_suspend
author黄涛 <huangtao@rock-chips.com>
Tue, 8 Jun 2010 08:03:33 +0000 (08:03 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:35:24 +0000 (13:35 +0800)
drivers/spi/rk2818_spim.c

index 7cb074fea0e03d5580a8d943778ceebda1c448d8..73c74213773abe7e80045e870e11f084b204bdfd 100644 (file)
@@ -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)