Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 961d57c8 authored by Miguel Botón's avatar Miguel Botón Committed by David S. Miller
Browse files

ssb: add 'ssb_pcihost_set_power_state' function



This patch adds the 'ssb_pcihost_set_power_state' function.

This function allows us to set the power state of a PCI device
(for example b44 ethernet device).

Signed-off-by: default avatarMiguel Botón <mboton@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent aa6c7ae2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -365,6 +365,13 @@ static inline void ssb_pcihost_unregister(struct pci_driver *driver)
{
	pci_unregister_driver(driver);
}

static inline
void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t state)
{
	if (sdev->bus->bustype == SSB_BUSTYPE_PCI)
		pci_set_power_state(sdev->bus->host_pci, state);
}
#endif /* CONFIG_SSB_PCIHOST */