diff options
author | Vaibhav Gupta <vaibhavgupta40@gmail.com> | 2020-11-02 17:47:07 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-11-26 05:14:30 +0100 |
commit | 6897b9a177dfe38795bb4c086dc72edff7aba779 (patch) | |
tree | 75c1e135d2c453146d269ad5cb7d529969b38ff9 /drivers/scsi/aic7xxx/aic7xxx_pci.c | |
parent | scsi: aacraid: Use generic power management (diff) | |
download | linux-6897b9a177dfe38795bb4c086dc72edff7aba779.tar.xz linux-6897b9a177dfe38795bb4c086dc72edff7aba779.zip |
scsi: aic7xxx: Use generic power management
Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.
Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend & .resume bindings.
Link: https://lore.kernel.org/r/20201102164730.324035-7-vaibhavgupta40@gmail.com
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_pci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 656f680c7802..dab3a6d12c4d 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c @@ -2008,8 +2008,7 @@ ahc_pci_chip_init(struct ahc_softc *ahc) return (ahc_chip_init(ahc)); } -#ifdef CONFIG_PM -void +void __maybe_unused ahc_pci_resume(struct ahc_softc *ahc) { /* @@ -2040,7 +2039,6 @@ ahc_pci_resume(struct ahc_softc *ahc) ahc_release_seeprom(&sd); } } -#endif static int ahc_aic785X_setup(struct ahc_softc *ahc) |