From patchwork Tue Mar 23 10:12:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 87590 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NADrQb022743 for ; Tue, 23 Mar 2010 10:13:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606Ab0CWKNw (ORCPT ); Tue, 23 Mar 2010 06:13:52 -0400 Received: from smtp.nokia.com ([192.100.122.230]:24743 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552Ab0CWKNu (ORCPT ); Tue, 23 Mar 2010 06:13:50 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2NADeIX010298; Tue, 23 Mar 2010 12:13:47 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Mar 2010 12:13:41 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Mar 2010 12:13:40 +0200 Received: from localhost.localdomain (esdhcp04152.research.nokia.com [172.21.41.52]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2NADc3k023071; Tue, 23 Mar 2010 12:13:38 +0200 From: Mika Westerberg To: linux-i2c@vger.kernel.org Cc: linux-omap@vger.kernel.org, Cory Maccarrone Subject: [PATCH] i2c: omap: fix OOPS in omap_i2c_unidle() during probe Date: Tue, 23 Mar 2010 12:12:56 +0200 Message-Id: <1269339176-17479-1-git-send-email-ext-mika.1.westerberg@nokia.com> X-Mailer: git-send-email 1.5.6.5 X-OriginalArrivalTime: 23 Mar 2010 10:13:41.0259 (UTC) FILETIME=[8311FDB0:01CACA71] X-Nokia-AV: Clean 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.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 10:13:58 +0000 (UTC) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index c7c2375..0d5a54a 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -902,6 +902,11 @@ omap_i2c_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dev); + if (cpu_is_omap7xx()) + dev->reg_shift = 1; + else + dev->reg_shift = 2; + if ((r = omap_i2c_get_clocks(dev)) != 0) goto err_iounmap; @@ -925,11 +930,6 @@ omap_i2c_probe(struct platform_device *pdev) dev->b_hw = 1; /* Enable hardware fixes */ } - if (cpu_is_omap7xx()) - dev->reg_shift = 1; - else - dev->reg_shift = 2; - /* reset ASAP, clearing any IRQs */ omap_i2c_init(dev);