1 Jan 2008 01:16
[PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function
Miguel Botón <mboton.lkml <at> gmail.com>
2008-01-01 00:16:46 GMT
2008-01-01 00:16:46 GMT
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 <at> gmail.com>
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index a21ab29..aa70fd0 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
<at> <at> -349,6 +349,13 <at> <at> 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 */
--
--
Miguel Botón
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
(Continue reading)
RSS Feed