]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
misc: rtsx: Cleanup power management ops
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 4 Mar 2022 06:55:20 +0000 (14:55 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 10:49:39 +0000 (11:49 +0100)
commit468d8209d6ea73f6cf7c23d13d3563d561d1f567
tree97cb6420778c635fd717e1e533595b2403a86e71
parentbbefc16ee001b3d3f10fa74c64e5946f84270d0d
misc: rtsx: Cleanup power management ops

BugLink: https://bugs.launchpad.net/bugs/1963615
- Use cancel_delayed_work_sync to ensure there's no race with
  carddet_work.

- Remove device_wakeup_disable to save some CPU cycles. If the device
  really has ACPI _DSW then the wakeup should be disabled in probe
  routine.

- Remove fetch_vendor_settings from runtime resume routine, since they
  are already saved in "struct rtsx_pcr".

- Move variable assignments to the top of the functions.

Cc: Ricky WU <ricky_wu@realtek.com>
Tested-by: Ricky WU <ricky_wu@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20220125055010.1866563-3-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b11a3c7a4b31fbc331670d5e2378ed71a4334be0 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/misc/cardreader/rtsx_pcr.c