Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/3] compat: fix device_lock functions on non rt kernel
@ 2010-10-23 18:13 Hauke Mehrtens
  2010-10-23 18:14 ` [PATCH 2/3] compat: lock correct mutex in device_lock Hauke Mehrtens
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hauke Mehrtens @ 2010-10-23 18:13 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens, Blaise Gassend

CONFIG_NONE and CONFIG_PREEMPT_VOLUNTARY are not added by the last RT
patch. I have not found any references to CONFIG_NONE, probably
CONFIG_PREEMPT_NONE was meant, but that is also wrong like
CONFIG_PREEMPT_VOLUNTARY. These two options are also in the normal kernel
config system without the rt patch.

This patch only checks for KConfig options added by the rt patch, but a
rt-patch user could also select PREEMPT_NONE or PREEMPT_VOLUNTARY, and
compat-wireless will not build. I do not think this will hapen often, so leave
it like this.

This patch fixes build with all non rt-kernels.

CC: Blaise Gassend <blaise@willowgarage.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.34.h |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/include/linux/compat-2.6.34.h b/include/linux/compat-2.6.34.h
index 1cfd6e5..f710d08 100644
--- a/include/linux/compat-2.6.34.h
+++ b/include/linux/compat-2.6.34.h
@@ -142,8 +142,7 @@ do {								\
 
 static inline void device_lock(struct device *dev)
 {
-#if defined(CONFIG_NONE) || defined(CONFIG_PREEMPT_RT) || \
-    defined(CONFIG_PREEMPT_VOLUNTARY) || defined(CONFIG_PREEMPT_DESKTOP)
+#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_DESKTOP)
         mutex_lock(&dev->parent->mutex);
 #else
 	down(&dev->sem);
@@ -152,8 +151,7 @@ static inline void device_lock(struct device *dev)
 
 static inline int device_trylock(struct device *dev)
 {
-#if defined(CONFIG_NONE) || defined(CONFIG_PREEMPT_RT) || \
-    defined(CONFIG_PREEMPT_VOLUNTARY) || defined(CONFIG_PREEMPT_DESKTOP)
+#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_DESKTOP)
 	return mutex_trylock(&dev->mutex);
 #else
 	return down_trylock(&dev->sem);
@@ -162,8 +160,7 @@ static inline int device_trylock(struct device *dev)
 
 static inline void device_unlock(struct device *dev)
 {
-#if defined(CONFIG_NONE) || defined(CONFIG_PREEMPT_RT) || \
-    defined(CONFIG_PREEMPT_VOLUNTARY) || defined(CONFIG_PREEMPT_DESKTOP)
+#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_DESKTOP)
         mutex_unlock(&dev->mutex);
 #else
 	up(&dev->sem);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-10-25 19:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-23 18:13 [PATCH 1/3] compat: fix device_lock functions on non rt kernel Hauke Mehrtens
2010-10-23 18:14 ` [PATCH 2/3] compat: lock correct mutex in device_lock Hauke Mehrtens
2010-10-23 20:01   ` Luis R. Rodriguez
2010-10-23 18:14 ` [PATCH 3/3] compat: add empty implementation for usb_enable_autosuspend Hauke Mehrtens
2010-10-24 19:19 ` [PATCH 1/3] compat: fix device_lock functions on non rt kernel Blaise Gassend
2010-10-24 19:39   ` Hauke Mehrtens
2010-10-24 20:41     ` Blaise Gassend
2010-10-25 16:49       ` Luis R. Rodriguez
2010-10-25 19:24         ` Blaise Gassend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox