From 02770b94ef98488e5f3a2f255ab32bcf6829710d Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Mon, 23 Jan 2006 06:58:06 +0000 Subject: Use mutexes in pvrusb2 for kernel 2.6.16 or later From: Mike Isely Signed-off-by: Mike Isely --- v4l_experimental/pvrusb2/pvrusb2-context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'v4l_experimental/pvrusb2/pvrusb2-context.c') diff --git a/v4l_experimental/pvrusb2/pvrusb2-context.c b/v4l_experimental/pvrusb2/pvrusb2-context.c index 483aba179..1f8b400a0 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-context.c +++ b/v4l_experimental/pvrusb2/pvrusb2-context.c @@ -1,5 +1,5 @@ /* - * $Id: pvrusb2-context.c,v 1.2 2006/01/01 08:26:03 mcisely Exp $ + * $Id: pvrusb2-context.c,v 1.3 2006/01/23 06:58:06 mcisely Exp $ * * Copyright (C) 2005 Mike Isely * @@ -82,7 +82,7 @@ struct pvr2_context *pvr2_context_create( memset(mp,0,sizeof(*mp)); pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_main id=%p",mp); mp->setup_func = setup_func; - init_MUTEX(&mp->sem); + mutex_init(&mp->mutex); mp->hdw = pvr2_hdw_create(intf); if (!mp->hdw) { pvr2_context_destroy(mp); @@ -101,7 +101,7 @@ struct pvr2_context *pvr2_context_create( void pvr2_context_enter(struct pvr2_context *mp) { - down(&mp->sem); + mutex_lock(&mp->mutex); pvr2_trace(PVR2_TRACE_CREG,"pvr2_context_enter(id=%p)",mp); } @@ -113,7 +113,7 @@ void pvr2_context_exit(struct pvr2_context *mp) destroy_flag = !0; } pvr2_trace(PVR2_TRACE_CREG,"pvr2_context_exit(id=%p) outside",mp); - up(&mp->sem); + mutex_unlock(&mp->mutex); if (destroy_flag) pvr2_context_destroy(mp); } -- cgit v1.2.3