Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reset: use ENOTSUPP instead of ENOSYS

ENOSYS is reserved to report invalid syscalls to userspace.
Consistently return ENOTSUPP to indicate that the driver doesn't support
the functionality or the reset framework is not enabled at all.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

+8 -8
+4 -4
drivers/reset/core.c
··· 95 95 if (rstc->rcdev->ops->reset) 96 96 return rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); 97 97 98 - return -ENOSYS; 98 + return -ENOTSUPP; 99 99 } 100 100 EXPORT_SYMBOL_GPL(reset_control_reset); 101 101 ··· 108 108 if (rstc->rcdev->ops->assert) 109 109 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); 110 110 111 - return -ENOSYS; 111 + return -ENOTSUPP; 112 112 } 113 113 EXPORT_SYMBOL_GPL(reset_control_assert); 114 114 ··· 121 121 if (rstc->rcdev->ops->deassert) 122 122 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); 123 123 124 - return -ENOSYS; 124 + return -ENOTSUPP; 125 125 } 126 126 EXPORT_SYMBOL_GPL(reset_control_deassert); 127 127 ··· 136 136 if (rstc->rcdev->ops->status) 137 137 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); 138 138 139 - return -ENOSYS; 139 + return -ENOTSUPP; 140 140 } 141 141 EXPORT_SYMBOL_GPL(reset_control_status); 142 142
+4 -4
include/linux/reset.h
··· 74 74 75 75 static inline int device_reset_optional(struct device *dev) 76 76 { 77 - return -ENOSYS; 77 + return -ENOTSUPP; 78 78 } 79 79 80 80 static inline struct reset_control *__must_check reset_control_get( ··· 94 94 static inline struct reset_control *reset_control_get_optional( 95 95 struct device *dev, const char *id) 96 96 { 97 - return ERR_PTR(-ENOSYS); 97 + return ERR_PTR(-ENOTSUPP); 98 98 } 99 99 100 100 static inline struct reset_control *devm_reset_control_get_optional( 101 101 struct device *dev, const char *id) 102 102 { 103 - return ERR_PTR(-ENOSYS); 103 + return ERR_PTR(-ENOTSUPP); 104 104 } 105 105 106 106 static inline struct reset_control *of_reset_control_get( 107 107 struct device_node *node, const char *id) 108 108 { 109 - return ERR_PTR(-ENOSYS); 109 + return ERR_PTR(-ENOTSUPP); 110 110 } 111 111 112 112 static inline struct reset_control *of_reset_control_get_by_index(