aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorDaniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>2016-06-24 15:22:22 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-24 15:22:22 +0200
commit969e527bbefedfa5142b6552823386e5eb10667f (patch)
treec7a7256d2f78f89408ee01a951624a5ac39fe172 /package/kernel
parent82cca2e530b12e50f29b7b14fab24506883e7e17 (diff)
downloadmaster-187ad058-969e527bbefedfa5142b6552823386e5eb10667f.tar.gz
master-187ad058-969e527bbefedfa5142b6552823386e5eb10667f.tar.bz2
master-187ad058-969e527bbefedfa5142b6552823386e5eb10667f.zip
lantiq: Reduce ugliness of ugly hack
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch18
1 files changed, 4 insertions, 14 deletions
diff --git a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
index 80f085492c..1d1e5669ac 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
@@ -1,6 +1,6 @@
--- a/src/include/drv_dsl_cpe_os_linux.h
+++ b/src/include/drv_dsl_cpe_os_linux.h
-@@ -214,12 +214,35 @@ static inline int dsl_mutex_lock(struct
+@@ -214,12 +214,25 @@ static inline int dsl_mutex_lock(struct
#define DSL_DRV_MUTEX_LOCK(id) down_interruptible(&(id))
#define DSL_DRV_MUTEX_UNLOCK(id) up(&(id))
#endif
@@ -8,21 +8,11 @@
+static inline long
+ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout)
+{
-+ unsigned long flags;
-+ wait_queue_t wait;
-+
-+ init_waitqueue_entry(&wait, current);
-+
-+ __set_current_state(TASK_INTERRUPTIBLE);
-+ spin_lock_irqsave(&q->lock, flags);
-+ __add_wait_queue(q, &wait);
-+ spin_unlock(&q->lock);
++ DEFINE_WAIT(wait);
+
++ prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE);
+ timeout = schedule_timeout(timeout);
-+
-+ spin_lock_irq(&q->lock);
-+ __remove_wait_queue(q, &wait);
-+ spin_unlock_irqrestore(&q->lock, flags);
++ finish_wait(q, &wait);
+
+ return timeout;
+}