From patchwork Sat Nov 7 09:56:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Bachmann X-Patchwork-Id: 58311 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 nA79uS58024773 for ; Sat, 7 Nov 2009 09:56:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbZKGJ4V (ORCPT ); Sat, 7 Nov 2009 04:56:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751318AbZKGJ4V (ORCPT ); Sat, 7 Nov 2009 04:56:21 -0500 Received: from mail.gmx.net ([213.165.64.20]:51352 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751248AbZKGJ4V (ORCPT ); Sat, 7 Nov 2009 04:56:21 -0500 Received: (qmail invoked by alias); 07 Nov 2009 09:56:25 -0000 Received: from p4FDD5024.dip.t-dialin.net (EHLO duron.grafnetz) [79.221.80.36] by mail.gmx.net (mp047) with SMTP; 07 Nov 2009 10:56:25 +0100 X-Authenticated: #1282162 X-Provags-ID: V01U2FsdGVkX1847CZrfAs4nC2V7K8v/NbOJX3qWMbojpu1VpjMbz Tu5PdVvhidxJdm Received: from x2.grafnetz ([192.168.0.4]) by duron.grafnetz with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1N6i1n-00049l-DR; Sat, 07 Nov 2009 10:56:23 +0100 Date: Sat, 7 Nov 2009 10:56:14 +0100 From: Mario Bachmann To: Patrick Boettcher Cc: linux-media@vger.kernel.org Subject: dibusb-common.c FE_HAS_LOCK problem Message-ID: <20091107105614.7a51f2f5@x2.grafnetz> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.47 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -Naur dibusb-common.c-ORIGINAL dibusb-common.c --- dibusb-common.c-ORIGINAL 2009-11-07 10:30:43.705344308 +0100 +++ dibusb-common.c 2009-11-07 10:33:49.969345253 +0100 @@ -133,17 +133,14 @@ for (i = 0; i < num; i++) { /* write/read request */ - if (i+1 < num && (msg[i].flags & I2C_M_RD) == 0 - && (msg[i+1].flags & I2C_M_RD)) { + if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) { if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len, msg[i+1].buf,msg[i+1].len) < 0) break; i++; - } else if ((msg[i].flags & I2C_M_RD) == 0) { + } else if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,NULL,0) < 0) break; - } else - break; } mutex_unlock(&d->i2c_mutex);