From patchwork Thu Jun 13 19:24:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 251153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 51BE62C0040 for ; Fri, 14 Jun 2013 05:29:12 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755225Ab3FMT3L (ORCPT ); Thu, 13 Jun 2013 15:29:11 -0400 Received: from swan.laptop.org ([18.85.2.166]:47765 "EHLO swan.laptop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999Ab3FMT3K (ORCPT ); Thu, 13 Jun 2013 15:29:10 -0400 X-Greylist: delayed 334 seconds by postgrey-1.27 at vger.kernel.org; Thu, 13 Jun 2013 15:29:10 EDT Received: from dev.laptop.org (crank.laptop.org [18.85.2.147]) by swan.laptop.org (Postfix) with ESMTP id 114AF316773; Thu, 13 Jun 2013 15:23:12 -0400 (EDT) Received: by dev.laptop.org (Postfix, from userid 1230) id 51006FAACE; Thu, 13 Jun 2013 15:24:57 -0400 (EDT) From: Daniel Drake To: wsa@the-dreams.de Cc: linux-i2c@vger.kernel.org Subject: [PATCH] i2c-pxa: prepare clock before use Message-Id: <20130613192457.51006FAACE@dev.laptop.org> Date: Thu, 13 Jun 2013 15:24:57 -0400 (EDT) Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On OLPC XO-1.75 (MMP2), a WARN_ON() was occurring during boot since the clock being enabled by i2c-pxa had not been prepared. Use clk_prepare_enable() to ensure that the prepare operation has taken place. Signed-off-by: Daniel Drake --- drivers/i2c/busses/i2c-pxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index ea6d45d..ef307ea 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1160,7 +1160,7 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.class = plat->class; } - clk_enable(i2c->clk); + clk_prepare_enable(i2c->clk); if (i2c->use_pio) { i2c->adap.algo = &i2c_pxa_pio_algorithm;