dmaengine: pch_dma: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Mon, 20 Jul 2020 11:37:41 +0000 (17:07 +0530)
committerVinod Koul <vkoul@kernel.org>
Mon, 17 Aug 2020 04:53:55 +0000 (10:23 +0530)
commit7db7f8e0a375d364c79cbc2d14ffe8ee594f0906
tree9ae2523ae7139cdb09148b230bdb953c8567ba6f
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
dmaengine: pch_dma: use generic power management

Drivers using legacy PM have to manage PCI states and device's PM states
themselves. They also need to take care of configuration registers.

With improved and powerful support of generic PM, PCI Core takes care of
above mentioned, device-independent, jobs.

This driver makes use of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(),
and pci_set_power_state() to do required operations. In generic mode, they
are no longer needed.

Change function parameter in both .suspend() and .resume() to
"struct device*" type. Use dev_get_drvdata() to get drv data.

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200720113740.353479-1-vaibhavgupta40@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/pch_dma.c