From patchwork Tue Nov 6 09:54:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 1703891 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 74CAFDF2A2 for ; Tue, 6 Nov 2012 09:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164Ab2KFJzI (ORCPT ); Tue, 6 Nov 2012 04:55:08 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:58107 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935Ab2KFJzH (ORCPT ); Tue, 6 Nov 2012 04:55:07 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id qA69sgCd016938; Tue, 6 Nov 2012 03:54:43 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA69sd7N017708; Tue, 6 Nov 2012 15:24:40 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Tue, 6 Nov 2012 15:24:39 +0530 Received: from ula0393217.india.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA69saGO000595; Tue, 6 Nov 2012 15:24:36 +0530 From: Shubhrajyoti D To: CC: , , , , , , Shubhrajyoti D Subject: [PATCH] i2c: omap: Move the remove constraint Date: Tue, 6 Nov 2012 15:24:33 +0530 Message-ID: <1352195673-31559-1-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Currently we just queue the transfer and release the qos constraints, however we donot wait for the transfer to complete to release the constraint. Move the remove constraint after the bus busy as we are sure that the transfers are completed by then. Signed-off-by: Shubhrajyoti D Acked-by: Jean Pihet --- drivers/i2c/busses/i2c-omap.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 94ff685..8b079d7 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -655,13 +655,13 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) break; } - if (dev->latency) - pm_qos_remove_request(&dev->pm_qos_request); - if (r == 0) r = num; omap_i2c_wait_for_bb(dev); + + if (dev->latency) + pm_qos_remove_request(&dev->pm_qos_request); out: pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev);