From patchwork Tue Mar 8 11:08:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 617921 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p28B8VGK026600 for ; Tue, 8 Mar 2011 11:08:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754386Ab1CHLIb (ORCPT ); Tue, 8 Mar 2011 06:08:31 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:52226 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754095Ab1CHLIa (ORCPT ); Tue, 8 Mar 2011 06:08:30 -0500 Received: by mail-ww0-f44.google.com with SMTP id 36so951436wwa.1 for ; Tue, 08 Mar 2011 03:08:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=AoFCbVShV1oRm6TNVlYU1/qM5LV3GSQzFtqGw3RzcXY=; b=qOkUn5YxL+jGzdhNnIRQl2u5wTfFFUuswrglR/U3Guwdypt9mZU9xkAo6w9oKLhRYR Y65PahNmeep+1gXAB1PmL1cA/GFb7/o/ZX2xPjXY2vuPuU6JIqAfhFbNeLzuiYLA4WN9 kGyVHYx/klWaYyb+bJzXiHOrZFVDvWQMU+Pcs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=jEInYF2Abh3HqxcjoW0iGDQtiEHOe1WN4lB6/z5xuyL/+y8Vz6JwbcYlYLdSabCYn4 Kq/PjzJl5AR+tdkyWEnBPOAktuZwHNYQ3X+d1Pusug2ZzdD8rBTxADBRbU16lRfGHmy3 VxkUgYpTinhOj++oyl3rBRvdUXt16gK362yj8= Received: by 10.216.221.16 with SMTP id q16mr4213679wep.71.1299582509596; Tue, 08 Mar 2011 03:08:29 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id j49sm252501wer.14.2011.03.08.03.08.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:08:29 -0800 (PST) From: Andy Green Subject: [PATCH 2 09/18] I2C: OMAP2+: Solve array bounds overflow error on i2c idle To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Tue, 08 Mar 2011 11:08:27 +0000 Message-ID: <20110308110827.23531.55834.stgit@otae.warmcat.com> In-Reply-To: <20110308105934.23531.83540.stgit@otae.warmcat.com> References: <20110308105934.23531.83540.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 08 Mar 2011 11:08:32 +0000 (UTC) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index eee0bb8..14f5b50 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -309,7 +309,7 @@ static void omap_i2c_idle(struct omap_i2c_dev *dev) pdata = pdev->dev.platform_data; dev->iestate = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG); - if (dev->rev >= OMAP_I2C_REV_ON_4430) + if (pdata->rev == OMAP_I2C_IP_VERSION_2) omap_i2c_write_reg(dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1); else omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, 0);