]> git.baikalelectronics.ru Git - kernel.git/commit
cardreader/rtsx_pcr.c: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Mon, 20 Jul 2020 10:17:23 +0000 (15:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2020 13:17:37 +0000 (15:17 +0200)
commitc45db59ddceeb2be679275729d471126c3dd2f14
tree8482265eedca47c62cb28c2ad93adffb923b098c
parent547421aee15e820c114bb9dcbc68606bc73746f3
cardreader/rtsx_pcr.c: use generic power management

Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.

With generic PM, all essentials will be handled by the  PCI core. Driver
needs to do only device-specific operations.

The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Link: https://lore.kernel.org/r/20200720101722.145211-1-vaibhavgupta40@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rtsx_pcr.c