| Message ID | 20260831152306.166630-2-ivanrwcm25@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | gpio: cdev: EOPNOTSUPP when HTE unavailable | expand |
On Mon, 31 Aug 2026 12:23:06 -0300, Iván Ezequiel Rodriguez wrote: > Map hte_ts_get() -ENODEV to -EOPNOTSUPP so userspace sees the same > errno as when CONFIG_HTE is disabled or EVENT_CLOCK_HTE is unsupported. > > Makes sense. I hope it will not break any user-space users, though that's highly unlikely. [1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable https://git.kernel.org/brgl/c/cf176c115497bc6462391c3118bedfd212092c4d Best regards,
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 9f3b628d5793..6dc01f7ea838 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -715,6 +715,8 @@ static int hte_edge_setup(struct line *line, u64 eflags) line->desc); ret = hte_ts_get(NULL, hdesc, 0); + if (ret == -ENODEV) + return -EOPNOTSUPP; if (ret) return ret;
Map hte_ts_get() -ENODEV to -EOPNOTSUPP so userspace sees the same errno as when CONFIG_HTE is disabled or EVENT_CLOCK_HTE is unsupported. Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com> --- drivers/gpio/gpiolib-cdev.c | 2 ++ 1 file changed, 2 insertions(+)