]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
st_kim: allow suspend if callback is not registered
authorGigi Joseph <gigi.joseph@gmail.com>
Fri, 9 Jan 2015 03:46:24 +0000 (03:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2015 13:04:10 +0000 (05:04 -0800)
Suspend/resume was failing if callbacks were not registered.
As it is ok not to do anything when suspending fix this
so it soen't return an error and allow the system to suspend.

Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Gigi Joseph <gigi.joseph@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ti-st/st_kim.c

index 68a0b582d81a1866988f7f455f733de7f87deaf9..f2c1071e54c92b4ce8aa3cb25e01d34663b7c7b5 100644 (file)
@@ -908,7 +908,7 @@ static int kim_suspend(struct platform_device *pdev, pm_message_t state)
        if (pdata->suspend)
                return pdata->suspend(pdev, state);
 
-       return -EOPNOTSUPP;
+       return 0;
 }
 
 static int kim_resume(struct platform_device *pdev)
@@ -925,7 +925,7 @@ static int kim_resume(struct platform_device *pdev)
        if (pdata->resume)
                return pdata->resume(pdev);
 
-       return -EOPNOTSUPP;
+       return 0;
 }
 
 /**********************************************************************/