From: Krzysztof Kozlowski Date: Thu, 30 Jan 2014 13:51:19 +0000 (+0100) Subject: regulator: s2mps11: Fix NULL pointer of_node value when using platform data X-Git-Tag: v3.14-rc2~24^2^3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54820f5802295993b78a373e404e7561039b399d;p=pandora-kernel.git regulator: s2mps11: Fix NULL pointer of_node value when using platform data When platform_data is used for regulator (of_node of sec-core MFD device is NULL) the config.of_node for regulator is not initialized. This NULL value of config.of_node is later stored during regulator_register(). Thus any call by regulator consumers to of_get_regulator() will fail on of_parse_phandle() returning NULL. In this case (using platform_data and parent's driver of_node is NULL) set the config.of_node to reg_node from platform_data. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- Reading git-diff-tree failed