]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ssb: add 'ssb_pcihost_set_power_state' function
authorMiguel Botón <mboton.lkml@gmail.com>
Tue, 1 Jan 2008 00:16:46 +0000 (01:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:09:18 +0000 (15:09 -0800)
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>
include/linux/ssb/ssb.h

index cacbae531945f2b3b5e214de11f14b692d5f0f34..1ab4688c678b0e102e076aee1d0eec84e7e3242d 100644 (file)
@@ -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 */