OSDN Git Service

media: bttv: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Tue, 28 Jul 2020 10:24:18 +0000 (12:24 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 27 Nov 2020 13:11:26 +0000 (14:11 +0100)
commita3f132df0e5f25399c9592c2d14997975ddbf290
tree45beff45f50bb9bf4e99ca745d0177f769b7a782
parentacc4c91ebbfb29bad4a55b923175170b297ff431
media: bttv: use generic power management

Drivers using legacy power management .suspen()/.resume() callbacks
have to manage PCI states and device's PM states themselves. They also
need to take care of standard configuration registers.

Switch to generic power management framework using a single
"struct dev_pm_ops" variable to take the unnecessary load from the driver.
This also avoids the need for the driver to directly call most of the PCI
helper functions and device power state control functions, as through
the generic framework PCI Core takes care of the necessary operations,
and drivers are required to do only device-specific jobs.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/bt8xx/bttv-driver.c