misc: rtsx: Cleanup power management ops
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 25 Jan 2022 05:50:08 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jan 2022 17:53:28 +0000 (18:53 +0100)
commitb11a3c7a4b31fbc331670d5e2378ed71a4334be0
treeaa9b1e25a73ec0fb57e3c78bf7a42863d934bcf2
parent597568e8df046ebf349c706b281a711297ab20fb
misc: rtsx: Cleanup power management ops

- 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>
drivers/misc/cardreader/rtsx_pcr.c