]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: hp_accel: Avoid invoking _INI to speed up resume
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 30 Apr 2021 06:07:35 +0000 (14:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 06:22:07 +0000 (08:22 +0200)
commitcf5502e81afe9d7a4abad999c79eb54d53316c2e
treebf6e4a1b6143f84ebba9b1669805a13856825ea5
parentf9469082126cebb7337db3992d143f5e4edfe629
platform/x86: hp_accel: Avoid invoking _INI to speed up resume

[ Upstream commit 79d341e26ebcdbc622348aaaab6f8f89b6fdb25f ]

hp_accel can take almost two seconds to resume on some HP laptops.

The bottleneck is on evaluating _INI, which is only needed to run once.

Resolve the issue by only invoking _INI when it's necessary. Namely, on
probe and on hibernation restore.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Éric Piel <eric.piel@trempplin-utc.net>
Link: https://lore.kernel.org/r/20210430060736.590321-1-kai.heng.feng@canonical.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/lis3lv02d/lis3lv02d.h
drivers/platform/x86/hp_accel.c