staging: sm750fb: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Tue, 28 Jul 2020 12:33:49 +0000 (18:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 12:01:37 +0000 (14:01 +0200)
commit408a68c5f64fe2f7921449d655ffef5038144f06
tree4d13eb6f876b901ea9dbc844942729279d6601d8
parent341a8f866e7252e7c0410fdd53fe513a9c12f3d2
staging: sm750fb: 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>
Link: https://lore.kernel.org/r/20200728123349.1331679-1-vaibhavgupta40@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c