media: cafe-driver: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Tue, 21 Jul 2020 04:47:45 +0000 (06:47 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 6 Aug 2020 09:26:42 +0000 (11:26 +0200)
commite3083c3f369700cd1eec3de93b8d8ec0918ff778
tree389e19eb06633d4aabd8c363141e0bf6f28b5173
parent7aa87db5b81b0281c7493ab58e4f702525e85fe4
media: cafe-driver: 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() and pci_enable/disable_device() to do required
operations. In generic mode, they are no longer needed.

Change function parameter in both .suspend() and .resume() to
"struct device*" type.

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/marvell-ccic/cafe-driver.c
drivers/media/platform/marvell-ccic/mcam-core.c
drivers/media/platform/marvell-ccic/mcam-core.h