Skip to content

Commit f6892d1

Browse files
committed
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>
1 parent b53a234 commit f6892d1

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

include/linux/of.h

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,6 @@ struct of_prop_reconfig {
324324
struct property *old_prop;
325325
};
326326

327-
extern int of_reconfig_notifier_register(struct notifier_block *);
328-
extern int of_reconfig_notifier_unregister(struct notifier_block *);
329-
extern int of_reconfig_notify(unsigned long, void *);
330-
extern int of_reconfig_get_state_change(unsigned long action, void *arg);
331-
332327
extern int of_attach_node(struct device_node *);
333328
extern int of_detach_node(struct device_node *);
334329

@@ -895,6 +890,11 @@ enum of_reconfig_change {
895890
};
896891

897892
#ifdef CONFIG_OF_DYNAMIC
893+
extern int of_reconfig_notifier_register(struct notifier_block *);
894+
extern int of_reconfig_notifier_unregister(struct notifier_block *);
895+
extern int of_reconfig_notify(unsigned long, void *);
896+
extern int of_reconfig_get_state_change(unsigned long action, void *arg);
897+
898898
extern void of_changeset_init(struct of_changeset *ocs);
899899
extern void of_changeset_destroy(struct of_changeset *ocs);
900900
extern int of_changeset_apply(struct of_changeset *ocs);
@@ -932,7 +932,24 @@ static inline int of_changeset_update_property(struct of_changeset *ocs,
932932
{
933933
return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop);
934934
}
935-
#endif
935+
#else /* CONFIG_OF_DYNAMIC */
936+
static inline int of_reconfig_notifier_register(struct notifier_block *nb)
937+
{
938+
return -EINVAL;
939+
}
940+
static inline int of_reconfig_notifier_unregister(struct notifier_block *nb)
941+
{
942+
return -EINVAL;
943+
}
944+
static inline int of_reconfig_notify(unsigned long action, void *arg)
945+
{
946+
return -EINVAL;
947+
}
948+
static inline int of_reconfig_get_state_change(unsigned long action, void *arg)
949+
{
950+
return -EINVAL;
951+
}
952+
#endif /* CONFIG_OF_DYNAMIC */
936953

937954
/* CONFIG_OF_RESOLVE api */
938955
extern int of_resolve_phandles(struct device_node *tree);

0 commit comments

Comments
 (0)