Changeset 44845


Ignore:
Timestamp:
2015-03-16T14:05:49+01:00 (3 years ago)
Author:
nbd
Message:

ltq-adsl-mei: fix bugs in linux 3.18 compatiblity change

Signed-off-by: Felix Fietkau <nbd@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h

    r44346 r44845  
    108108        init_waitqueue_head(&queue) 
    109109 
     110static inline long 
     111ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout) 
     112{ 
     113        unsigned long flags; 
     114        wait_queue_t wait; 
     115 
     116        init_waitqueue_entry(&wait, current); 
     117 
     118        __set_current_state(TASK_INTERRUPTIBLE); 
     119        spin_lock_irqsave(&q->lock, flags); 
     120        __add_wait_queue(q, &wait); 
     121        spin_unlock(&q->lock); 
     122 
     123        timeout = schedule_timeout(timeout); 
     124 
     125        spin_lock_irq(&q->lock); 
     126        __remove_wait_queue(q, &wait); 
     127        spin_unlock_irqrestore(&q->lock, flags); 
     128 
     129        return timeout; 
     130} 
     131 
    110132/* wait for an event, timeout is measured in ms */ 
    111133#define MEI_WAIT_EVENT_TIMEOUT(ev,timeout)\ 
    112         wait_event_interruptible_timeout(ev,0 == 1, timeout * HZ / 1000) 
     134        ugly_hack_sleep_on_timeout(&ev, timeout * HZ / 1000) 
    113135#define MEI_WAKEUP_EVENT(ev)\ 
    114136        wake_up_interruptible(&ev) 
Note: See TracChangeset for help on using the changeset viewer.