regulator: Check for constraints in regulator_init_complete()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Mark Brown 2009-08-03 18:49:55 +01:00 коммит произвёл Liam Girdwood
Родитель b39480ac37
Коммит f25e0b4fcc
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2409,14 +2409,14 @@ static int __init regulator_init_complete(void)
ops = rdev->desc->ops; ops = rdev->desc->ops;
c = rdev->constraints; c = rdev->constraints;
if (c->name) if (c && c->name)
name = c->name; name = c->name;
else if (rdev->desc->name) else if (rdev->desc->name)
name = rdev->desc->name; name = rdev->desc->name;
else else
name = "regulator"; name = "regulator";
if (!ops->disable || c->always_on) if (!ops->disable || (c && c->always_on))
continue; continue;
mutex_lock(&rdev->mutex); mutex_lock(&rdev->mutex);