Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reset: Add compile-test stubs

Add stubs for the reset controller registration functions to allow
building reset controller provider drivers with the COMPILE_TEST
Kconfig option enabled.

Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Suggested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210609112806.3565057-3-thierry.reding@gmail.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Thierry Reding and committed by
Philipp Zabel
48a74b11 5e787cdf

+22
+22
include/linux/reset-controller.h
··· 79 79 unsigned int nr_resets; 80 80 }; 81 81 82 + #if IS_ENABLED(CONFIG_RESET_CONTROLLER) 82 83 int reset_controller_register(struct reset_controller_dev *rcdev); 83 84 void reset_controller_unregister(struct reset_controller_dev *rcdev); 84 85 ··· 89 88 90 89 void reset_controller_add_lookup(struct reset_control_lookup *lookup, 91 90 unsigned int num_entries); 91 + #else 92 + static inline int reset_controller_register(struct reset_controller_dev *rcdev) 93 + { 94 + return 0; 95 + } 96 + 97 + static inline void reset_controller_unregister(struct reset_controller_dev *rcdev) 98 + { 99 + } 100 + 101 + static inline int devm_reset_controller_register(struct device *dev, 102 + struct reset_controller_dev *rcdev) 103 + { 104 + return 0; 105 + } 106 + 107 + static inline void reset_controller_add_lookup(struct reset_control_lookup *lookup, 108 + unsigned int num_entries) 109 + { 110 + } 111 + #endif 92 112 93 113 #endif