reset: use ENOTSUPP instead of ENOSYS
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 29 Oct 2015 08:55:00 +0000 (09:55 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 16 Nov 2015 08:23:47 +0000 (09:23 +0100)
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>
drivers/reset/core.c
include/linux/reset.h

index 77cfc49218c63b27e28c8a2848877b04c4e8783c..9ab929049b9dfc00c5e05a3350218fb853365821 100644 (file)
@@ -95,7 +95,7 @@ int reset_control_reset(struct reset_control *rstc)
        if (rstc->rcdev->ops->reset)
                return rstc->rcdev->ops->reset(rstc->rcdev, rstc->id);
 
-       return -ENOSYS;
+       return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(reset_control_reset);
 
@@ -108,7 +108,7 @@ int reset_control_assert(struct reset_control *rstc)
        if (rstc->rcdev->ops->assert)
                return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id);
 
-       return -ENOSYS;
+       return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(reset_control_assert);
 
@@ -121,7 +121,7 @@ int reset_control_deassert(struct reset_control *rstc)
        if (rstc->rcdev->ops->deassert)
                return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id);
 
-       return -ENOSYS;
+       return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(reset_control_deassert);
 
@@ -136,7 +136,7 @@ int reset_control_status(struct reset_control *rstc)
        if (rstc->rcdev->ops->status)
                return rstc->rcdev->ops->status(rstc->rcdev, rstc->id);
 
-       return -ENOSYS;
+       return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(reset_control_status);
 
index 6db74ad3dec74afe9a2b07a8736515ad5c64fd65..c4c097de0ba9e042c3a357e06c6b3f6d5dc5e58e 100644 (file)
@@ -74,7 +74,7 @@ static inline void reset_control_put(struct reset_control *rstc)
 
 static inline int device_reset_optional(struct device *dev)
 {
-       return -ENOSYS;
+       return -ENOTSUPP;
 }
 
 static inline struct reset_control *__must_check reset_control_get(
@@ -94,19 +94,19 @@ static inline struct reset_control *__must_check devm_reset_control_get(
 static inline struct reset_control *reset_control_get_optional(
                                        struct device *dev, const char *id)
 {
-       return ERR_PTR(-ENOSYS);
+       return ERR_PTR(-ENOTSUPP);
 }
 
 static inline struct reset_control *devm_reset_control_get_optional(
                                        struct device *dev, const char *id)
 {
-       return ERR_PTR(-ENOSYS);
+       return ERR_PTR(-ENOTSUPP);
 }
 
 static inline struct reset_control *of_reset_control_get(
                                struct device_node *node, const char *id)
 {
-       return ERR_PTR(-ENOSYS);
+       return ERR_PTR(-ENOTSUPP);
 }
 
 static inline struct reset_control *of_reset_control_get_by_index(
This page took 0.026775 seconds and 5 git commands to generate.