lkml.org 
[lkml]   [2012]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] mfd: avoid to return failure in 88pm860x
Date
While touch field of 88pm860x platform_data isn't assigned, probe
function returns failure. Now update code to only return without
failure since touch field isn't always used in each usage scenario.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
---
drivers/mfd/88pm860x-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index bde9231..60faf9b 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -551,7 +551,7 @@ static int __devinit device_gpadc_init(struct pm860x_chip *chip,
/* initialize GPADC without activating it */

if (!pdata || !pdata->touch)
- return -EINVAL;
+ return 0;

/* set GPADC MISC1 register */
data = 0;
--
1.7.9.5


\
 
 \ /
  Last update: 2012-08-05 19:21    [W:0.119 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site