提交 48a74b11 编写于 作者: T Thierry Reding 提交者: Philipp Zabel

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: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Suggested-by: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210609112806.3565057-3-thierry.reding@gmail.comSigned-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
上级 5e787cdf
...@@ -79,6 +79,7 @@ struct reset_controller_dev { ...@@ -79,6 +79,7 @@ struct reset_controller_dev {
unsigned int nr_resets; unsigned int nr_resets;
}; };
#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
int reset_controller_register(struct reset_controller_dev *rcdev); int reset_controller_register(struct reset_controller_dev *rcdev);
void reset_controller_unregister(struct reset_controller_dev *rcdev); void reset_controller_unregister(struct reset_controller_dev *rcdev);
...@@ -88,5 +89,26 @@ int devm_reset_controller_register(struct device *dev, ...@@ -88,5 +89,26 @@ int devm_reset_controller_register(struct device *dev,
void reset_controller_add_lookup(struct reset_control_lookup *lookup, void reset_controller_add_lookup(struct reset_control_lookup *lookup,
unsigned int num_entries); unsigned int num_entries);
#else
static inline int reset_controller_register(struct reset_controller_dev *rcdev)
{
return 0;
}
static inline void reset_controller_unregister(struct reset_controller_dev *rcdev)
{
}
static inline int devm_reset_controller_register(struct device *dev,
struct reset_controller_dev *rcdev)
{
return 0;
}
static inline void reset_controller_add_lookup(struct reset_control_lookup *lookup,
unsigned int num_entries)
{
}
#endif
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册