diff options
author | Mike Isely <devnull@localhost> | 2006-01-23 06:58:06 +0000 |
---|---|---|
committer | Mike Isely <devnull@localhost> | 2006-01-23 06:58:06 +0000 |
commit | 02770b94ef98488e5f3a2f255ab32bcf6829710d (patch) | |
tree | e0bc4d8d28cdf841a01d6abbe8b020c392234d7d /v4l_experimental/pvrusb2/pvrusb2-context.c | |
parent | 5a0c9ba6e3b1171b5998d194fd5d7d9142f45881 (diff) | |
download | mediapointer-dvb-s2-02770b94ef98488e5f3a2f255ab32bcf6829710d.tar.gz mediapointer-dvb-s2-02770b94ef98488e5f3a2f255ab32bcf6829710d.tar.bz2 |
Use mutexes in pvrusb2 for kernel 2.6.16 or later
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-context.c')
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-context.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <isely@pobox.com> * @@ -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); } |