On 7/8/22 16:14, Hans de Goede wrote: > @@ -950,13 +953,19 @@ static int __init lenovo_yoga_tab2_830_1050_init(void) > if (ret) > return ret; > > - pm_power_off = lenovo_yoga_tab2_830_1050_power_off; > + /* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off */ > + lenovo_yoga_tab2_830_1050_sys_off_handler = > + register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE + 1, > + lenovo_yoga_tab2_830_1050_power_off, NULL); > + if (IS_ERR(lenovo_yoga_tab2_830_1050_sys_off_handler)) > + return PTR_ERR(lenovo_yoga_tab2_830_1050_sys_off_handler); Please note that technically we could ignore the registration error (maybe print error message) and allow the rest of the module to work without the power-off. The unregister_sys_off_handler() will skip the ERR_PTR handler. -- Best regards, Dmitry