From 4918cc14500a8701e202f4107461d8c8e0bf85f3 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Wed, 18 May 2011 00:17:32 -0500 Subject: [PATCH] --- yaml --- r: 272762 b: refs/heads/master c: 2aed5b9e8877237886453f138be7ecea224b32b0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/omap_twl.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d9f338fcb7a..491d8ca35fc1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 366494250b60af14fbab4d94d6bb1d1b6d17f10b +refs/heads/master: 2aed5b9e8877237886453f138be7ecea224b32b0 diff --git a/trunk/arch/arm/mach-omap2/omap_twl.c b/trunk/arch/arm/mach-omap2/omap_twl.c index 5def7c274f75..b30adf349b73 100644 --- a/trunk/arch/arm/mach-omap2/omap_twl.c +++ b/trunk/arch/arm/mach-omap2/omap_twl.c @@ -95,6 +95,8 @@ static unsigned long twl6030_vsel_to_uv(const u8 vsel) is_offset_valid = true; } + if (!vsel) + return 0; /* * There is no specific formula for voltage to vsel * conversion above 1.3V. There are special hardcoded @@ -127,6 +129,8 @@ static u8 twl6030_uv_to_vsel(unsigned long uv) is_offset_valid = true; } + if (!uv) + return 0x00; /* * There is no specific formula for voltage to vsel * conversion above 1.3V. There are special hardcoded