reset: Fix compile when reset RESET_CONTROLLER is not selected
PATCH 1/1 reset: Fix compile when reset RESET_CONTROLLER is not selected
Drivers need to protect their reset api calls with #ifdef to avoid compile errors. This patch adds dummy wrappers in the same way that linux/of.h does it. This results in the nasty ifdefs no longer being needed.
--- include/linux/reset-controller.h | 16 ++++++++++++++ include/linux/reset.h | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+)
include/linux/reset-controller.h +16 -0
@@ -45,7 +45,23 @@ struct reset_controller_dev { unsigned int nr_resets; }; +#if defined(CONFIG_RESET_CONTROLLER ) +int reset_controller_register (struct reset_controller_dev *rcdev);void reset_controller_unregister (struct reset_controller_dev *rcdev); +#else + +static inline int reset_controller_register (struct reset_controller_dev *rcdev) +{ +return -ENOSYS ; +} + +void reset_controller_unregister (struct reset_controller_dev *rcdev) +{ + +} + +#endif +#endif
include/linux/reset.h +43 -0
56 lines not on this page · raw message
Signature · 1 line
1.7.10.4