From: Anton Eliasson Date: Thu, 3 Aug 2023 11:26:42 +0000 (+0200) Subject: tty: serial: samsung: Set missing PM ops for hibernation support X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c58f2ae0ee94901da078a60961262df03eab7552;p=linux.git tty: serial: samsung: Set missing PM ops for hibernation support At least freeze, restore and thaw need to be set in order for the driver to support system hibernation. The existing suspend/resume functions can be reused since those functions don't touch the device's power state or wakeup capability. Use the helper macros SET_SYSTEM_SLEEP_PM_OPS and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS for symmetry with similar drivers. Signed-off-by: Anton Eliasson Link: https://lore.kernel.org/r/20230803-samsung_tty_pm_ops-v1-1-1ea7be72194d@axis.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index aa4a184f4a6c7..07fb8a9dac633 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2274,9 +2274,8 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) } static const struct dev_pm_ops s3c24xx_serial_pm_ops = { - .suspend = s3c24xx_serial_suspend, - .resume = s3c24xx_serial_resume, - .resume_noirq = s3c24xx_serial_resume_noirq, + SET_SYSTEM_SLEEP_PM_OPS(s3c24xx_serial_suspend, s3c24xx_serial_resume) + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, s3c24xx_serial_resume_noirq) }; #define SERIAL_SAMSUNG_PM_OPS (&s3c24xx_serial_pm_ops)