Skip to contentSkip to conversation

compat: add pm_runtime_enabled() for kver < 2.6.38

PATCH In review Ozan Çağlayan 1 participant 2 messages Sep 22, 2011 – Nov 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat: add pm_runtime_enabled() for kver < 2.6.38

Without this, the build of wl12xx/sdio.c fails.

---
 include/linux/compat-2.6.38.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/compat-2.6.38.h +4 -0
index 1f9ab52..d6da16e 100644
@@ -11,6 +11,10 @@
 /* rename member in struct mmc_host in include/linux/mmc/host.h */
 #define max_segs	max_hw_segs
 
+static inline bool pm_runtime_enabled(struct device *dev)
+{
+	return !dev->power.disable_depth;
+}
 
 /* Exponentially weighted moving average (EWMA) */
 
Signature · 1 line
1.7.6
#1 lore raw

22-09-2011 08:50 tarihinde, Ozan Çağlayan yazdı:

Quoted 12 lines

Without this, the build of wl12xx/sdio.c fails.

---
  include/linux/compat-2.6.38.h |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/compat-2.6.38.h +0 -0
index 1f9ab52..d6da16e 100644

include/linux/compat-2.6.38.h line 20

Quoted 10 lines
include/linux/compat-2.6.38.h +4 -0
@@ -11,6 +11,10 @@
  /* rename member in struct mmc_host in include/linux/mmc/host.h */
  #define max_segs	max_hw_segs
 
+static inline bool pm_runtime_enabled(struct device *dev)
+{
+	return !dev->power.disable_depth;
+}
 
  /* Exponentially weighted moving average (EWMA) */
 

Any comments?