Skip to content

Commit

Permalink
st_kim: allow suspend if callback is not registered
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Gigi Joseph <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Gigi Joseph authored and gregkh committed Jan 12, 2015
1 parent 46d0d33 commit 4b4aa3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/misc/ti-st/st_kim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -925,7 +925,7 @@ static int kim_resume(struct platform_device *pdev)
if (pdata->resume)
return pdata->resume(pdev);

return -EOPNOTSUPP;
return 0;
}

/**********************************************************************/
Expand Down

0 comments on commit 4b4aa3a

Please sign in to comment.