Re: [patch] kill compile warning on twl4030-power.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 15, 2008 at 07:21:25PM +0300, Felipe Balbi wrote:
> On Mon, Sep 15, 2008 at 06:55:12PM +0300, Peter 'p2' De Schrijver wrote:
> > On Mon, Sep 15, 2008 at 06:12:11PM +0300, ext Felipe Balbi wrote:
> > > From: Felipe Balbi <felipe.balbi@xxxxxxxxx>
> > > 
> > > This part of the patch was left out on previous merge. Here's a
> > > fix for that.
> > > 
> > 
> > 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:

and I missed the #include <asm/mach-types.h>

> 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;
> -       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);
-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux