Inter-revision diff: patch 12

Comparing v2 (message) to v3 (message)

--- v2
+++ v3
@@ -9,13 +9,23 @@
 unnecessary calls to the PCI Helper functions along with the legacy
 .suspend & .resume bindings.
 
+The ark_pci_suspend() is not designed to function in the case of Freeze.
+Thus, the code checked for "if (state.event = PM_EVENT_FREEZE....)". This
+is because, in the legacy framework, this callback was invoked even in the
+event of Freeze. Hence, added the load of unnecessary function-call.
+
+The goal can be achieved by binding the callback with only ".suspend" and
+".poweroff" in the "ark_pci_pm_ops" const variable. This also avoids the
+step of checking "state.event = PM_EVENT_FREEZE" every time the callback
+is invoked.
+
 Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
 ---
  drivers/video/fbdev/arkfb.c | 41 +++++++++++++++----------------------
  1 file changed, 17 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
-index 11ab9a153860..6a4114db0dfd 100644
+index 11ab9a153860..edf169d0816e 100644
 --- a/drivers/video/fbdev/arkfb.c
 +++ b/drivers/video/fbdev/arkfb.c
 @@ -1085,12 +1085,11 @@ static void ark_pci_remove(struct pci_dev *dev)
@@ -93,7 +103,7 @@
 +#ifdef CONFIG_PM_SLEEP
 +	.suspend	= ark_pci_suspend,
 +	.resume		= ark_pci_resume,
-+	.freeze		= ark_pci_suspend,
++	.freeze		= NULL,
 +	.thaw		= ark_pci_resume,
 +	.poweroff	= ark_pci_suspend,
 +	.restore	= ark_pci_resume,
@@ -113,4 +123,4 @@
  
  /* Cleanup */
 -- 
-2.27.0
+2.28.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help