reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get()
PATCH 1/1 reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get()
From: Mark Brown <[email protected]>
At least the sun6i DMA controller driver makes use of the reset controller API stubs when being built for coverage and otherwise fails to build.
--- include/linux/reset.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/linux/reset.h +7 -0
@@ -67,6 +67,13 @@ static inline int device_reset_optional(struct device *dev)return -ENOSYS ; } +static inline struct reset_control *devm_reset_control_get (struct device *dev, +const char *id) +{ +WARN_ON (1 ); +return ERR_PTR (-ENOSYS ); +} +static inline struct reset_control *reset_control_get_optional (struct device *dev,const char *id) {
Signature · 1 line
2.0.0
Philipp Zabel
maintainerHi Mark,
Am Freitag, den 01.08.2014, 18:11 +0100 schrieb Mark Brown:
Quoted 15 lines
From: Mark Brown <[email protected]>
At least the sun6i DMA controller driver makes use of the reset controller API stubs when being built for coverage and otherwise fails to build.
Signed-off-by Mark Brown <[email protected]>--- include/linux/reset.h | 7 +++++++ 1 file changed, 7 insertions(+)include/linux/reset.h +0
-0
include/linux/reset.h static inline int device_reset_optional(struct device *dev) · line 76
Quoted 10 lines
include/linux/reset.h +7
-0@@ -67,6 +67,13 @@ static inline int device_reset_optional(struct device *dev)return -ENOSYS ; } +static inline struct reset_control *devm_reset_control_get (struct device *dev, +const char *id) +{ +WARN_ON (1 ); +return ERR_PTR (-ENOSYS ); +} +
I'd prefer to keep devm_reset_control_get without a stub. Drivers that can be built without CONFIG_RESET_CONTROLLER enabled should use devm_reset_control_get_optional, and this way the build tests already report this issue.
regards
Philipp