From aedb444a577184f7e113e1461fccc0ef10ffde55 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Tue, 28 Jul 2009 13:46:24 -0400 Subject: Staging: hv: remove WAITEVENT typedef Remove the WAITEVENT typedef and also replace HANDLE types that use the WaitEvent calls with struct osd_waitevent. Signed-off-by: Bill Pemberton Cc: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/osd.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'drivers/staging/hv/osd.c') diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 4cee746d01c..50a2ca7dde2 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -55,12 +55,6 @@ typedef struct _TIMER { void* context; }TIMER; - -typedef struct _WAITEVENT { - int condition; - wait_queue_head_t event; -} WAITEVENT; - typedef struct _WORKITEM { struct work_struct work; PFN_WORKITEM_CALLBACK callback; @@ -220,9 +214,9 @@ void TimerClose(HANDLE hTimer) kfree(t); } -HANDLE WaitEventCreate(void) +struct osd_waitevent *WaitEventCreate(void) { - WAITEVENT* wait = kmalloc(sizeof(WAITEVENT), GFP_KERNEL); + struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), GFP_KERNEL); if (!wait) { return NULL; @@ -233,38 +227,34 @@ HANDLE WaitEventCreate(void) return wait; } -void WaitEventClose(HANDLE hWait) +void WaitEventClose(struct osd_waitevent *waitEvent) { - WAITEVENT* waitEvent = (WAITEVENT* )hWait; kfree(waitEvent); } -void WaitEventSet(HANDLE hWait) +void WaitEventSet(struct osd_waitevent *waitEvent) { - WAITEVENT* waitEvent = (WAITEVENT* )hWait; waitEvent->condition = 1; wake_up_interruptible(&waitEvent->event); } -int WaitEventWait(HANDLE hWait) +int WaitEventWait(struct osd_waitevent *waitEvent) { int ret=0; - WAITEVENT* waitEvent = (WAITEVENT* )hWait; - ret= wait_event_interruptible(waitEvent->event, - waitEvent->condition); + ret = wait_event_interruptible(waitEvent->event, + waitEvent->condition); waitEvent->condition = 0; return ret; } -int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs) +int WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs) { int ret=0; - WAITEVENT* waitEvent = (WAITEVENT* )hWait; - ret= wait_event_interruptible_timeout(waitEvent->event, - waitEvent->condition, - msecs_to_jiffies(TimeoutInMs)); + ret = wait_event_interruptible_timeout(waitEvent->event, + waitEvent->condition, + msecs_to_jiffies(TimeoutInMs)); waitEvent->condition = 0; return ret; } -- cgit v1.2.3