[PATCH 1/2] ssb: Add "ssb_pci_set_power_state" function

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <linux-wireless@...>, <linville@...>, <mb@...>
Date: Wednesday, October 24, 2007 - 3:31 pm

Add "ssb_pci_set_power_state" function. This allows set the power state of a 
PCI device (for example b44 ethernet device).

diff -ruN linux-2.6.23/include/linux/ssb/ssb.h 
linux-2.6.23.orig/include/linux/ssb/ssb.h
--- linux-2.6.23.orig/include/linux/ssb/ssb.h	2007-10-24 19:02:33.000000000 
+0200
+++ linux-2.6.23/include/linux/ssb/ssb.h	2007-10-24 19:49:37.000000000 +0200
@@ -402,6 +402,14 @@
 {
 	pci_unregister_driver(driver);
 }
+
+/* Set PCI device power state */
+static inline
+void ssb_pci_set_power_state(struct ssb_device *dev, pci_power_t state)
+{
+	if(dev->bus->bustype == SSB_BUSTYPE_PCI)
+		pci_set_power_state(dev->bus->host_pci, state);
+}
 #endif /* CONFIG_SSB_PCIHOST */
 
 

-- 
	Miguel Botón
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] ssb: Add "ssb_pci_set_power_state" function, Miguel , (Wed Oct 24, 3:31 pm)
Re: [PATCH 1/2] ssb: Add "ssb_pci_set_power_state" function, John W. Linville, (Tue Nov 6, 10:32 pm)