]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: 8250_dw: fix runtime PM initialization sequence
authorArtem Shimko <a.shimko.dev@gmail.com>
Tue, 4 Nov 2025 14:54:26 +0000 (17:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Dec 2025 14:05:00 +0000 (15:05 +0100)
commit485c13d9bc7a83532c038757c2f155728bb4bb38
tree1aede8bae6f303d1c3542d2d94e5b379ad0ae9b4
parentd31228143a489ba6ba797896a07541ce06828c09
serial: 8250_dw: fix runtime PM initialization sequence

Move pm_runtime_set_active() call earlier in probe to simplify error
handling and add proper error checking to ensure the device is marked
as active before any runtime PM operations can occur.

Additionally, replace the const struct dev_pm_ops declaration with
_DEFINE_DEV_PM_OPS macro for better consistency with modern kernel PM
patterns.

Signed-off-by: Artem Shimko <a.shimko.dev@gmail.com>
Link: https://patch.msgid.link/20251104145433.2316165-3-a.shimko.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c