reset: stub out devm_reset_control_get()
PATCH 1/1 reset: stub out devm_reset_control_get()
without that stub, drivers will fail to build
when CONFIG_RESET_CONTROLLER=n.
--- include/linux/reset.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/linux/reset.h +6 -0
@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(return ERR_PTR (-ENOSYS ); } +static inline struct reset_control *devm_reset_control_get ( +struct device *dev,const char *id) +{ +return ERR_PTR (-ENOSYS ); +} +#endif /* CONFIG_RESET_CONTROLLER */ #endif
Signature · 1 line
2.0.0.rc1
Quoted 13 lines · Felipe Balbi
without that stub, drivers will fail to build
whenCONFIG_RESET_CONTROLLER=n.Signed-off-by Felipe Balbi <[email protected]>--- include/linux/reset.h | 6 ++++++ 1 file changed, 6 insertions(+)include/linux/reset.h +0
-0
include/linux/reset.h static inline struct reset_control *devm_reset_control_get_optional( · line 83
Quoted 9 lines
include/linux/reset.h +6
-0@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(return ERR_PTR (-ENOSYS ); } +static inline struct reset_control *devm_reset_control_get ( +struct device *dev,const char *id) +{ +return ERR_PTR (-ENOSYS ); +} +
reset_control_get should only be used in cases where the reset controller is mandatory for the driver to work, and hence, this driver should select or depend on CONFIG_RESET_CONTROLLER
If the reset controller is optional, reset_control_get_optional should be preferred, that is stubed out.
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 28 lines · Maxime Ripard
Quoted 13 lines · Felipe Balbi
without that stub, drivers will fail to build
whenCONFIG_RESET_CONTROLLER=n.Signed-off-by Felipe Balbi <[email protected]>--- include/linux/reset.h | 6 ++++++ 1 file changed, 6 insertions(+)include/linux/reset.h +0
-0include/linux/reset.h static inline struct reset_control *devm_reset_control_get_optional( · line 83
Quoted 9 lines
include/linux/reset.h +6
-0@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(return ERR_PTR (-ENOSYS ); } +static inline struct reset_control *devm_reset_control_get ( +struct device *dev,const char *id) +{ +return ERR_PTR (-ENOSYS ); +} +
reset_control_getshould only be used in cases where the reset controller is mandatory for the driver to work, and hence, this driver should select or depend onCONFIG_RESET_CONTROLLER
Quoted 2 lines
If the reset controller is optional,
reset_control_get_optionalshould be preferred, that is stubed out.
fair enough, depends on it is
Signature · 1 line
balbi