From patchwork Tue Mar 15 19:56:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 636991 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 p2FJv5BW007020 for ; Tue, 15 Mar 2011 19:57:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756368Ab1COT5B (ORCPT ); Tue, 15 Mar 2011 15:57:01 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:37340 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755854Ab1COT47 (ORCPT ); Tue, 15 Mar 2011 15:56:59 -0400 Received: by mail-ww0-f44.google.com with SMTP id 36so1206062wwa.1 for ; Tue, 15 Mar 2011 12:56:59 -0700 (PDT) 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=Hq/gGAneWz8L4wyX+ttMlHHNybecdknGlOO8BJuecPfjtds+OAegpB6pMpX2BzPJ1K XvasBn5KY8YUY8iy8MqwrIa6anXUyKGSov1PyiymITQHMVw/cMAiogZ0CoKVJsSKlUSD OKC7dmMZgJTWhdUIT9MBYUYaCP61vw5DPqV1E= 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=KO0LmFPiG2bxSiCN5DtxB63XBVeZVX2f8szMgDvI94+cOOobrO/JaOlcpuqLSBaXRq cTuef/GPLPjggzOC2BKs5BI494BpR0q+tCinDUZhGdOB//ac5+svjrCwPXbnGxQWgqve ywirgrF+VJ2jd50+VCgpfE2SimUiYSgs2TeTQ= Received: by 10.216.243.195 with SMTP id k45mr4400310wer.66.1300219019078; Tue, 15 Mar 2011 12:56:59 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id g32sm113403wej.3.2011.03.15.12.56.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:58 -0700 (PDT) From: Andy Green Subject: [PATCH 3 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, 15 Mar 2011 19:56:56 +0000 Message-ID: <20110315195656.30000.17732.stgit@otae.warmcat.com> In-Reply-To: <20110315195147.30000.86184.stgit@otae.warmcat.com> References: <20110315195147.30000.86184.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, 15 Mar 2011 19:57:06 +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);