Skip to content

Commit d6aa37c

Browse files
rafaeljwbjorn-helgaas
authored andcommitted
PCI/PM: Avoid exporting __pci_complete_power_transition()
Notice that radeon_set_suspend(), which is the only caller of __pci_complete_power_transition() outside of pci.c, really only cares about the pci_platform_power_transition() invoked by it, so export the latter instead of it, update the radeon driver to call pci_platform_power_transition() directly and make __pci_complete_power_transition() static. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/1731661.ykamz2Tiuf@kreacher Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
1 parent dc2256b commit d6aa37c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/pci/pci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ void pci_refresh_power_state(struct pci_dev *dev)
963963
* @dev: PCI device to handle.
964964
* @state: State to put the device into.
965965
*/
966-
static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
966+
int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
967967
{
968968
int error;
969969

@@ -979,6 +979,7 @@ static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
979979

980980
return error;
981981
}
982+
EXPORT_SYMBOL_GPL(pci_platform_power_transition);
982983

983984
/**
984985
* pci_wakeup - Wake up a PCI device
@@ -1061,7 +1062,7 @@ void pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state)
10611062
*
10621063
* This function should not be called directly by device drivers.
10631064
*/
1064-
int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state)
1065+
static int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state)
10651066
{
10661067
int ret;
10671068

@@ -1073,7 +1074,6 @@ int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state)
10731074
pci_bus_set_current_state(dev->subordinate, PCI_D3cold);
10741075
return ret;
10751076
}
1076-
EXPORT_SYMBOL_GPL(__pci_complete_power_transition);
10771077

10781078
/**
10791079
* pci_set_power_state - Set the power state of a PCI device

drivers/video/fbdev/aty/radeon_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend)
25932593
* calling pci_set_power_state()
25942594
*/
25952595
radeonfb_whack_power_state(rinfo, PCI_D2);
2596-
__pci_complete_power_transition(rinfo->pdev, PCI_D2);
2596+
pci_platform_power_transition(rinfo->pdev, PCI_D2);
25972597
} else {
25982598
printk(KERN_DEBUG "radeonfb (%s): switching to D0 state...\n",
25992599
pci_name(rinfo->pdev));

include/linux/pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
12281228
int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size);
12291229
int pci_add_ext_cap_save_buffer(struct pci_dev *dev,
12301230
u16 cap, unsigned int size);
1231-
int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state);
1231+
int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state);
12321232
int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
12331233
pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
12341234
bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);

0 commit comments

Comments
 (0)