Title: [8502] trunk/drivers/video/bfin_adv7393fb.c: [#5977] adv7393 power test failed in both standby and mem mode
Revision
8502
Author
hennerich
Date
2010-03-18 06:50:26 -0400 (Thu, 18 Mar 2010)

Log Message

[#5977] adv7393 power test failed in both standby and mem mode
Since dev_pm_ops work on i2c bus drivers only use pm_ops

Modified Paths

Diff

Modified: trunk/drivers/video/bfin_adv7393fb.c (8501 => 8502)


--- trunk/drivers/video/bfin_adv7393fb.c	2010-03-18 10:24:33 UTC (rev 8501)
+++ trunk/drivers/video/bfin_adv7393fb.c	2010-03-18 10:50:26 UTC (rev 8502)
@@ -743,10 +743,6 @@
 	return 0;
 }
 
-
-#undef USE_DEV_PM_OPS
-
-#ifdef USE_DEV_PM_OPS
 #ifdef CONFIG_PM
 static int bfin_adv7393_fb_suspend(struct device *dev)
 {
@@ -782,43 +778,10 @@
 	.suspend = bfin_adv7393_fb_suspend,
 	.resume  = bfin_adv7393_fb_resume,
 };
-#endif
 #else
-#ifdef CONFIG_PM
-static int bfin_adv7393_fb_suspend(struct i2c_client *client, pm_message_t state)
-{
-	struct adv7393fb_device *fbdev = i2c_get_clientdata(client);
-
-	if (fbdev->open) {
-		bfin_disable_dma();
-		bfin_disable_ppi();
-		dma_desc_list(fbdev, DESTRUCT);
-	}
-	adv7393_mode(client, POWER_DOWN);
-
-	return 0;
-}
-
-static int bfin_adv7393_fb_resume(struct i2c_client *client)
-{
-	struct adv7393fb_device *fbdev = i2c_get_clientdata(client);
-
-	adv7393_mode(client, POWER_ON);
-
-	if (fbdev->open) {
-		dma_desc_list(fbdev, BUILD);
-		bfin_config_ppi(fbdev);
-		bfin_config_dma(fbdev);
-		bfin_enable_ppi();
-	}
-
-	return 0;
-}
-#else
 #define bfin_adv7393_fb_suspend	NULL
 #define bfin_adv7393_fb_resume	NULL
 #endif
-#endif
 
 static const struct i2c_device_id bfin_adv7393_id[] = {
 	{DRIVER_NAME, 0},
@@ -830,18 +793,12 @@
 static struct i2c_driver bfin_adv7393_fb_driver = {
 	.driver = {
 		   .name = DRIVER_NAME,
-#ifdef USE_DEV_PM_OPS
 #ifdef CONFIG_PM
 		   .pm   = &bfin_adv7393_dev_pm_ops,
 #endif
-#endif
 	},
 	.probe = bfin_adv7393_fb_probe,
 	.remove = __devexit_p(bfin_adv7393_fb_remove),
-#ifndef USE_DEV_PM_OPS
-	.suspend = bfin_adv7393_fb_suspend,
-	.resume = bfin_adv7393_fb_resume,
-#endif
 	.id_table = bfin_adv7393_id,
 };
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to