aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/twl6040.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2018-01-18 15:26:28 +0800
committerAlex Shi <alex.shi@linaro.org>2018-01-18 15:26:28 +0800
commit2ba51c6d36ee1b43c1f898c6c48ddf3d33e9ab30 (patch)
treeff3302dc45a91d7bfcaabd37bfa8fa391a954180 /drivers/mfd/twl6040.c
parent28610abf4a574c33ca70e3d7b0e523fdede488d1 (diff)
parent90816cc1d4a1d23efe37b74866c6174dd5eab6b5 (diff)
Merge remote-tracking branch 'rt-stable/v4.9-rt' into linux-linaro-lsk-v4.9-rtlsk-v4.9-18.02-rt
Conflicts: arch/arm64/mm/init.c
Diffstat (limited to 'drivers/mfd/twl6040.c')
-rw-r--r--drivers/mfd/twl6040.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index d66502d36ba0..dd19f17a1b63 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -97,12 +97,16 @@ static struct reg_sequence twl6040_patch[] = {
};
-static bool twl6040_has_vibra(struct device_node *node)
+static bool twl6040_has_vibra(struct device_node *parent)
{
-#ifdef CONFIG_OF
- if (of_find_node_by_name(node, "vibra"))
+ struct device_node *node;
+
+ node = of_get_child_by_name(parent, "vibra");
+ if (node) {
+ of_node_put(node);
return true;
-#endif
+ }
+
return false;
}