reset: Add missing function stub for device_reset
PATCH 1/1 reset: Add missing function stub for device_reset
The Mediatek's thermal driver fails to compile when the RESET_CONTROLLER option is not set. Logically, as the driver depends on this option to compile, the Kconfig should select it but actually that is not correct because the Kconfig provides also the COMPILE_TEST to increase the compile test coverage.
By providing the missing 'device_reset' stub for the driver in reset.h, that let the kernel to compile on different platforms with the Mediatek thermal driver enabled with the COMPILE_TEST option.
--- include/linux/reset.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/reset.h +5 -0
@@ -72,6 +72,11 @@ static inline void reset_control_put(struct reset_control *rstc)WARN_ON (1 ); } +static inline int __must_check device_reset (struct device *dev) +{ +return -ENOTSUPP ; +} +static inline int device_reset_optional (struct device *dev) {return -ENOTSUPP ;
Signature · 1 line
1.9.1
Philipp Zabel
maintainerHi Daniel,
Am Freitag, den 01.04.2016, 21:38 +0200 schrieb Daniel Lezcano:
Quoted 19 lines
The Mediatek's thermal driver fails to compile when the
RESET_CONTROLLERoption is not set. Logically, as the driver depends on this option to compile, theKconfigshould select it but actually that is not correct because theKconfigprovides also theCOMPILE_TESTto increase the compile test coverage.By providing the missing '
device_reset' stub for the driver inreset.h, that let the kernel to compile on different platforms with the Mediatek thermal driver enabled with theCOMPILE_TESToption.Signed-off-by Daniel Lezcano <[email protected]>--- include/linux/reset.h | 5 +++++ 1 file changed, 5 insertions(+)include/linux/reset.h +0
-0
include/linux/reset.h static inline void reset_control_put(struct reset_control *rstc) · line 76
Quoted 5 lines
include/linux/reset.h +2
-0@@ -72,6 +72,11 @@ static inline void reset_control_put(struct reset_control *rstc)WARN_ON (1 ); } +static inline int __must_check device_reset (struct device *dev) +{
+ WARN_ON(1);
include/linux/reset.h static inline void reset_control_put(struct reset_control *rstc) · line 82
Quoted 6 lines
include/linux/reset.h +3
-0+return -ENOTSUPP ; +} +static inline int device_reset_optional (struct device *dev) {return -ENOTSUPP ;
Thank you, I've added the warning above and applied the patch.
best regards
Philipp