From: Guenter Roeck Date: Mon, 27 Jan 2014 18:10:00 +0000 (+0000) Subject: iio: max1363: Use devm_regulator_get_optional for optional regulator X-Git-Tag: v3.14-rc3~12^2~1^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55b40d37311807a6bb2acdae0df904f54a0da3ae;p=pandora-kernel.git iio: max1363: Use devm_regulator_get_optional for optional regulator In kernel version 3.13, devm_regulator_get() may return no error if a regulator is undeclared. regulator_get_voltage() will return -EINVAL if this happens. This causes the driver to fail loading if the vref regulator is not declared. Since vref is optional, call devm_regulator_get_optional instead. Signed-off-by: Guenter Roeck Cc: Stable@vger.kernel.org Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed