lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: as3711: Fix checking if no platform initialization data
From
Date
To skip registering regulator if no platform initialization data,
we should check reg_data rather than ri->desc.name.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/as3711-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index 2f1341d..f0ba8c4 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -303,7 +303,7 @@ static int as3711_regulator_probe(struct platform_device *pdev)
reg_data = pdata ? pdata->init_data[id] : NULL;

/* No need to register if there is no regulator data */
- if (!ri->desc.name)
+ if (!reg_data)
continue;

reg = &regs[id];
--
1.7.9.5




\
 
 \ /
  Last update: 2013-02-13 03:21    [W:0.043 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site