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>
This commit is contained in:
		
					parent
					
						
							
								b53a2340d0
							
						
					
				
			
			
				commit
				
					
						f6892d193f
					
				
			
		
					 1 changed files with 23 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue