aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2014-11-21 15:14:58 +0000
committerGrant Likely <grant.likely@linaro.org>2014-11-24 22:24:57 +0000
commitf6892d193fb9d694a1b50550649ba6e82f8abec1 (patch)
tree6a87760d77cd8eba3113e60f7444718bf3f41498 /include/linux/of.h
parentof/reconfig: Add of_reconfig_get_state_change() of notifier helper. (diff)
downloadlinux-dev-f6892d193fb9d694a1b50550649ba6e82f8abec1.tar.xz
linux-dev-f6892d193fb9d694a1b50550649ba6e82f8abec1.zip
of/reconfig: Add empty stubs for the of_reconfig methods
To simplify subsystem setup code, make empty stubs for the of_reconfig_*() methods. This is particularly useful for registering and unregistering the notifiers so that it doesn't impact the flow of the subsystem setup code. Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 8e3a264c869c..b59ee21933a4 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -324,11 +324,6 @@ struct of_prop_reconfig {
struct property *old_prop;
};
-extern int of_reconfig_notifier_register(struct notifier_block *);
-extern int of_reconfig_notifier_unregister(struct notifier_block *);
-extern int of_reconfig_notify(unsigned long, void *);
-extern int of_reconfig_get_state_change(unsigned long action, void *arg);
-
extern int of_attach_node(struct device_node *);
extern int of_detach_node(struct device_node *);
@@ -895,6 +890,11 @@ enum of_reconfig_change {
};
#ifdef CONFIG_OF_DYNAMIC
+extern int of_reconfig_notifier_register(struct notifier_block *);
+extern int of_reconfig_notifier_unregister(struct notifier_block *);
+extern int of_reconfig_notify(unsigned long, void *);
+extern int of_reconfig_get_state_change(unsigned long action, void *arg);
+
extern void of_changeset_init(struct of_changeset *ocs);
extern void of_changeset_destroy(struct of_changeset *ocs);
extern int of_changeset_apply(struct of_changeset *ocs);
@@ -932,7 +932,24 @@ static inline int of_changeset_update_property(struct of_changeset *ocs,
{
return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop);
}
-#endif
+#else /* CONFIG_OF_DYNAMIC */
+static inline int of_reconfig_notifier_register(struct notifier_block *nb)
+{
+ return -EINVAL;
+}
+static inline int of_reconfig_notifier_unregister(struct notifier_block *nb)
+{
+ return -EINVAL;
+}
+static inline int of_reconfig_notify(unsigned long action, void *arg)
+{
+ return -EINVAL;
+}
+static inline int of_reconfig_get_state_change(unsigned long action, void *arg)
+{
+ return -EINVAL;
+}
+#endif /* CONFIG_OF_DYNAMIC */
/* CONFIG_OF_RESOLVE api */
extern int of_resolve_phandles(struct device_node *tree);