diff options
author | John Youn <johnyoun@synopsys.com> | 2016-05-31 16:55:01 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-30 10:12:45 +0200 |
commit | e7c5a957389376853e75767f7fdf532a5ebd3392 (patch) | |
tree | 41ee0463eafd88346f4895fc8351cb5b139f354b /include | |
parent | 16964b31c088636d1b0f4de69b8214d27134d5f2 (diff) | |
download | linux-stable-e7c5a957389376853e75767f7fdf532a5ebd3392.tar.gz linux-stable-e7c5a957389376853e75767f7fdf532a5ebd3392.tar.bz2 linux-stable-e7c5a957389376853e75767f7fdf532a5ebd3392.zip |
reset: Return -ENOTSUPP when not configured
commit 168d7c4e8bb25c076ed8be67fcca84f5dcd0b2c6 upstream.
Prior to commit 6c96f05c8bb8 ("reset: Make [of_]reset_control_get[_foo]
functions wrappers"), the "optional" functions returned -ENOTSUPP when
CONFIG_RESET_CONTROLLER was not set.
Revert back to the old behavior by changing the new
__devm_reset_control_get() and __of_reset_control_get() functions to
return ERR_PTR(-ENOTSUPP) when compiled without CONFIG_RESET_CONTROLLER.
Otherwise they will return -EINVAL causing users to think that an error
occurred when CONFIG_RESET_CONTROLLER is not set.
Fixes: 6c96f05c8bb8 ("reset: Make [of_]reset_control_get[_foo] functions wrappers")
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/reset.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/reset.h b/include/linux/reset.h index 45a4abeb6acb..5daff15722d3 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -71,14 +71,14 @@ static inline struct reset_control *__of_reset_control_get( struct device_node *node, const char *id, int index, int shared) { - return ERR_PTR(-EINVAL); + return ERR_PTR(-ENOTSUPP); } static inline struct reset_control *__devm_reset_control_get( struct device *dev, const char *id, int index, int shared) { - return ERR_PTR(-EINVAL); + return ERR_PTR(-ENOTSUPP); } #endif /* CONFIG_RESET_CONTROLLER */ |