Re: [PATCH v6] auxdisplay: arm-charlcd: Use DEFINE_SIMPLE_DEV_PM_OPS for power management
From: Geert Uytterhoeven
Date: Thu Aug 27 2026 - 04:07:23 EST
On Thu, 27 Aug 2026 at 02:28, Li Jun <lijun01@xxxxxxxxxx> wrote:
> Replace the manually defined dev_pm_ops structure with the
> DEFINE_SIMPLE_DEV_PM_OPS macro to simplify the power management
> code, pm_sleep_ptr() to safely drop the references without
> triggering compiler warnings. This macro automatically handles
> CONFIG_PM_SLEEP configuration and generates freeze/thaw/poweroff/restore
> callbacks, reducing boilerplate code.
>
> Signed-off-by: Li Jun <lijun01@xxxxxxxxxx>
>
> ---
> Changes:
> -Replace SIMPLE_DEV_PM_OPS() in v1 v2 with DEFINE_SIMPLE_DEV_PM_OPS() for pm.
> -Corrected grammar errors in v1 v3 comment.
> -Add a description of pm_sleep_ptr() in v5.
> -Add pm_sleep_ptr(&charlcd_pm_ops) for charlcd_driver.
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds