浏览代码

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: Miguel Botón <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Miguel Botón 17 年之前
父节点
当前提交
961d57c883
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      include/linux/ssb/ssb.h

+ 7 - 0
include/linux/ssb/ssb.h

@@ -365,6 +365,13 @@ static inline void ssb_pcihost_unregister(struct pci_driver *driver)
 {
 {
 	pci_unregister_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 */
 #endif /* CONFIG_SSB_PCIHOST */