From 961d57c883198831503c7be5c088a26101dfb16c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Miguel=20Bot=C3=B3n?= Date: Tue, 1 Jan 2008 01:16:46 +0100 Subject: [PATCH] ssb: add 'ssb_pcihost_set_power_state' function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Miguel Botón Signed-off-by: John W. Linville --- include/linux/ssb/ssb.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index cacbae5319..1ab4688c67 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -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 */ -- 2.39.5