Skip to content

Commit 98634aa

Browse files
committed
PCI: PM: Drop struct pci_platform_pm_ops
After previous changes there are no more users of struct pci_platform_pm_ops in the tree, so drop it along with all of the remaining related code. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Ferry Toth <[email protected]>
1 parent d97c5d4 commit 98634aa

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

drivers/pci/pci.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -972,17 +972,6 @@ static void pci_restore_bars(struct pci_dev *dev)
972972
pci_update_resource(dev, i);
973973
}
974974

975-
static const struct pci_platform_pm_ops *pci_platform_pm;
976-
977-
int pci_set_platform_pm(const struct pci_platform_pm_ops *ops)
978-
{
979-
if (!ops->is_manageable || !ops->set_state || !ops->get_state ||
980-
!ops->choose_state || !ops->set_wakeup || !ops->need_resume)
981-
return -EINVAL;
982-
pci_platform_pm = ops;
983-
return 0;
984-
}
985-
986975
static inline bool platform_pci_power_manageable(struct pci_dev *dev)
987976
{
988977
if (pci_use_mid_pm())

drivers/pci/pci.h

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -63,45 +63,6 @@ struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
6363
#define PCI_PM_D3HOT_WAIT 10 /* msec */
6464
#define PCI_PM_D3COLD_WAIT 100 /* msec */
6565

66-
/**
67-
* struct pci_platform_pm_ops - Firmware PM callbacks
68-
*
69-
* @bridge_d3: Does the bridge allow entering into D3
70-
*
71-
* @is_manageable: returns 'true' if given device is power manageable by the
72-
* platform firmware
73-
*
74-
* @set_state: invokes the platform firmware to set the device's power state
75-
*
76-
* @get_state: queries the platform firmware for a device's current power state
77-
*
78-
* @refresh_state: asks the platform to refresh the device's power state data
79-
*
80-
* @choose_state: returns PCI power state of given device preferred by the
81-
* platform; to be used during system-wide transitions from a
82-
* sleeping state to the working state and vice versa
83-
*
84-
* @set_wakeup: enables/disables wakeup capability for the device
85-
*
86-
* @need_resume: returns 'true' if the given device (which is currently
87-
* suspended) needs to be resumed to be configured for system
88-
* wakeup.
89-
*
90-
* If given platform is generally capable of power managing PCI devices, all of
91-
* these callbacks are mandatory.
92-
*/
93-
struct pci_platform_pm_ops {
94-
bool (*bridge_d3)(struct pci_dev *dev);
95-
bool (*is_manageable)(struct pci_dev *dev);
96-
int (*set_state)(struct pci_dev *dev, pci_power_t state);
97-
pci_power_t (*get_state)(struct pci_dev *dev);
98-
void (*refresh_state)(struct pci_dev *dev);
99-
pci_power_t (*choose_state)(struct pci_dev *dev);
100-
int (*set_wakeup)(struct pci_dev *dev, bool enable);
101-
bool (*need_resume)(struct pci_dev *dev);
102-
};
103-
104-
int pci_set_platform_pm(const struct pci_platform_pm_ops *ops);
10566
void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
10667
void pci_refresh_power_state(struct pci_dev *dev);
10768
int pci_power_up(struct pci_dev *dev);

0 commit comments

Comments
 (0)