From patchwork Tue Nov 10 19:21:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pete Eberlein X-Patchwork-Id: 59138 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAAJY6CF025621 for ; Tue, 10 Nov 2009 19:34:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757910AbZKJTeJ (ORCPT ); Tue, 10 Nov 2009 14:34:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757909AbZKJTeJ (ORCPT ); Tue, 10 Nov 2009 14:34:09 -0500 Received: from gateway05.websitewelcome.com ([64.5.52.8]:54972 "HELO gateway05.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757876AbZKJTeI (ORCPT ); Tue, 10 Nov 2009 14:34:08 -0500 Received: (qmail 5722 invoked from network); 10 Nov 2009 19:36:30 -0000 Received: from gator886.hostgator.com (174.120.40.226) by gateway05.websitewelcome.com with SMTP; 10 Nov 2009 19:36:30 -0000 Received: from [66.15.212.169] (port=18739 helo=[10.140.5.16]) by gator886.hostgator.com with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1N7wNA-00060L-Oh for linux-media@vger.kernel.org; Tue, 10 Nov 2009 13:27:25 -0600 Subject: [PATCH 2/5] s2250: Mutex function usage. From: Pete Eberlein To: "linux-media@vger.kernel.org" Date: Tue, 10 Nov 2009 11:21:31 -0800 Message-Id: <1257880891.21307.1104.camel@pete-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator886.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sensoray.com Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r a603ad1e6a1c -r 99e4a0cf6788 linux/drivers/staging/go7007/s2250-board.c --- a/linux/drivers/staging/go7007/s2250-board.c Tue Nov 10 10:41:56 2009 -0800 +++ b/linux/drivers/staging/go7007/s2250-board.c Tue Nov 10 10:47:34 2009 -0800 @@ -261,7 +261,7 @@ memset(buf, 0xcd, 6); usb = go->hpi_context; - if (down_interruptible(&usb->i2c_lock) != 0) { + if (mutex_lock_interruptible(&usb->i2c_lock) != 0) { printk(KERN_INFO "i2c lock failed\n"); kfree(buf); return -EINTR; @@ -270,7 +270,7 @@ kfree(buf); return -EFAULT; } - up(&usb->i2c_lock); + mutex_unlock(&usb->i2c_lock); *val = (buf[0] << 8) | buf[1]; kfree(buf);