From patchwork Mon Aug 6 14:18:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1279551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 31BE03FD57 for ; Mon, 6 Aug 2012 14:26:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SyOCw-0006m4-FK; Mon, 06 Aug 2012 14:22:58 +0000 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1SyOCh-0006kQ-Br for linux-arm-kernel@lists.infradead.org; Mon, 06 Aug 2012 14:22:44 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKUB/TMVnzc+jZG9HadYnCM+d7wREvGo2C@postini.com; Mon, 06 Aug 2012 07:22:43 PDT Received: by lbbgm13 with SMTP id gm13so627738lbb.32 for ; Mon, 06 Aug 2012 07:22:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=MrLSFao4RJMrzJ+AV/z5Knqo1pAQNMa+ak+xqcjIow8=; b=Mh/SIRzArWFTZbFDzRK/7KRf9OfuafOMRAQrKnpTBB0eAcCUX47rA2thtJOtbp8uFH Man6uHrPqp6cwmp4q/F8LeCHHrkjVsPk1NjEGV8RUqWgV6CcHETsQembZ+45oIFnOCeo h+XVpnEYoBZLfkcpKkJXC/HzxloQ34lEzQA4YM3EkkUXWlUa9BTgx8YR/ugOd5vnDrxy z3o3lBQOpmUGOlN62cxrGx/L7e6DHWDqnZxviE+I+z74hnOT30/hrwvDz3TAkxsm/fgt R9DUQ6bvh/wAXaPl2dhNYoF0pj3EHFXRUo6fKVu9aFQBHABb+CIsVDem2vX5hEI+wQH6 QGow== Received: by 10.152.144.138 with SMTP id sm10mr10971235lab.22.1344262959965; Mon, 06 Aug 2012 07:22:39 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id q8sm3778503lbj.2.2012.08.06.07.22.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 07:22:39 -0700 (PDT) From: Felipe Balbi To: Shubhrajyoti Datta Subject: [PATCH 3/4] i2c: omap: remove unnecessary pm_runtime_suspended check Date: Mon, 6 Aug 2012 17:18:56 +0300 Message-Id: <1344262737-6662-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc0 In-Reply-To: <1344262737-6662-1-git-send-email-balbi@ti.com> References: <1344262737-6662-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQlfpJ0hgr8n5mxIiTPNnCOqqLpmcFirZ0A/+U1YQY5w5jQ8QTKBorbX//5MBbN4AthVJ862 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.197 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linux OMAP Mailing List , Felipe Balbi , w.sang@pengutronix.de, Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org before starting any messages we call pm_runtime_get_sync() which will make sure that by the time we program a transfer and our IRQ handler gets called, we're not suspended anymore. Signed-off-by: Felipe Balbi --- drivers/i2c/busses/i2c-omap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index a3db053..60928f2 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -883,9 +883,6 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) u16 stat; int err = 0, count = 0; - if (pm_runtime_suspended(dev->dev)) - return IRQ_HANDLED; - spin_lock_irqsave(&dev->lock, flags); do { bits = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);