From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Peter 'p2' De Schrijver" Subject: Re: [patch] kill compile warning on twl4030-power.c Date: Mon, 15 Sep 2008 19:24:21 +0300 Message-ID: <20080915162421.GH4712@codecarver.research.nokia.com> References: <20080915151208.GA17076@frodo> <20080915155512.GF4712@codecarver.research.nokia.com> <20080915162122.GB17076@frodo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.nokia.com ([192.100.122.230]:35541 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754631AbYIOQYe (ORCPT ); Mon, 15 Sep 2008 12:24:34 -0400 Content-Disposition: inline In-Reply-To: <20080915162122.GB17076@frodo> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: ext Felipe Balbi Cc: Linux OMAP Mailing List Hi, > > I doubt this works if you compile for SDP or labrador. OTOH the code for > > that bit looks suspicious :) > > Hmmm... that's true. That variable is only used on 3430sdp and 3430 > labrador. How about this version: > > diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c > index 04a13aa..b8723e8 100644 > --- a/drivers/i2c/chips/twl4030-power.c > +++ b/drivers/i2c/chips/twl4030-power.c > @@ -245,14 +245,15 @@ static int __init config_sleep_wake_sequence(void) > err |= twl4030_write_script(0x2F, sleep_off_seq, > ARRAY_SIZE(sleep_off_seq)); > > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR) > - /* Disabling AC charger effect on sleep-active transitions */ > - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data, > - R_CFG_P1_TRANSITION); > - data &= 0x0; This does not make sense :) > - err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data , > - R_CFG_P1_TRANSITION); > -#endif > + if (machine_is_omap_3430sdp()) { > + /* Disabling AC charger effect on sleep-active transitions */ > + err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data, > + R_CFG_P1_TRANSITION); > + data &= 0x0; > + err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data , > + R_CFG_P1_TRANSITION); > + } > + > /* P1/P2/P3 LVL_WAKEUP should be on LEVEL */ > err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP, > R_P1_SW_EVENTS); > > It's weird that a grep for LABRADOR on arch/arm does not return > anything. Are we missing some patches ?? > Hmm. Good question :) Cheers, Peter. -- goa is a state of mind