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: 1279531 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 B2674DF288 for ; Mon, 6 Aug 2012 14:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756519Ab2HFOWn (ORCPT ); Mon, 6 Aug 2012 10:22:43 -0400 Received: from na3sys009aog102.obsmtp.com ([74.125.149.69]:51984 "EHLO na3sys009aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756474Ab2HFOWm (ORCPT ); Mon, 6 Aug 2012 10:22:42 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]) (using TLSv1) by na3sys009aob102.postini.com ([74.125.148.12]) with SMTP ID DSNKUB/TMVnzc+jZG9HadYnCM+d7wREvGo2C@postini.com; Mon, 06 Aug 2012 07:22:42 PDT Received: by lbol12 with SMTP id l12so3120076lbo.30 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=EK2kVmMHqX5mxLJklvk9ImyAPrq+79XzQ0tZz2jedvPAYwov05oa5zMdMj2hFPbgjz fYsJlBgm3EQKcmPBYj8zLWIHpDqMt4tG0fQks1hXULNqF55EPft5sa1L6ZRmgzrQmAmW PLOJ4WKhjeneuFei+FpxtqwXEvMxXb4GUgs2TQM2ZkN4X7AkrA/n5Zbh99sX/JfB8B7u 8TXmnhkwLsjK1VeWQLSkF8Q/P8UvVRcXzl6e2+tjJsSVzZzDl21AnRbjoz9dEABcAQ5/ fg8YBzA8AmhoM6iPXLh1kwLWNRcbXjeNW1qokls9GIlO7wU/ghFaWw8r65y1UQ4Qb6IX xdxw== 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 Cc: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , w.sang@pengutronix.de, Felipe Balbi 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: ALoCoQkmfhpAO9X/wRWa63QR7agK4nZnTgqp4Ks3wKo8luWvCVUf1/RMDazOmKccI3nURtK7DIoK Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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);