msm: pil-q6v4: Flush instead of cancel delayed work on removal

If the pil q6v4 driver is removed or fails to probe we want to
ensure that the proxy votes made during boot are removed even if
they're pending removal. cancel_delayed_work_sync() will ensure
that the proxy vote removal callback no longer runs, but it
doesn't force the callback to run. This means that the proxy
votes stay in place even though the driver has been detached.
Therefore, replace cancel_delayed_work_sync() with
flush_delayed_work_sync() to forcibly remove the proxy votes
before detaching the driver.

Change-Id: I2eded919df598eb01e51eb24a5a32a93f75ad8de
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/pil-q6v4.c b/arch/arm/mach-msm/pil-q6v4.c
index cdbfc48..75606be 100644
--- a/arch/arm/mach-msm/pil-q6v4.c
+++ b/arch/arm/mach-msm/pil-q6v4.c
@@ -454,7 +454,7 @@
 		goto err_pil;
 	return 0;
 err_pil:
-	cancel_delayed_work_sync(&drv->work);
+	flush_delayed_work_sync(&drv->work);
 	msm_xo_put(drv->xo);
 err_xo:
 	regulator_put(drv->vreg);
@@ -466,7 +466,7 @@
 static int __devexit pil_q6v4_driver_exit(struct platform_device *pdev)
 {
 	struct q6v4_data *drv = platform_get_drvdata(pdev);
-	cancel_delayed_work_sync(&drv->work);
+	flush_delayed_work_sync(&drv->work);
 	msm_xo_put(drv->xo);
 	regulator_put(drv->vreg);
 	regulator_put(drv->pll_supply);