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

Configure Feed

Select the types of activity you want to include in your feed.

iio: backend: print message in case op is not implemented

For APIs that have a return value, -EOPNOTSUPP is returned in case the
backend does not support the functionality. However, for APIs that do
not have a return value we are left in silence. Hence, at least print a
debug message in case the callback is not implemented by the backend.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240709-dev-iio-backend-add-debugfs-v1-2-fb4b8f2373c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sa and committed by
Jonathan Cameron
dd97cdd5 8585632a

+4
+4
drivers/iio/industrialio-backend.c
··· 40 40 #include <linux/mutex.h> 41 41 #include <linux/property.h> 42 42 #include <linux/slab.h> 43 + #include <linux/stringify.h> 43 44 #include <linux/types.h> 44 45 45 46 #include <linux/iio/backend.h> ··· 112 111 __ret = iio_backend_check_op(__back, op); \ 113 112 if (!__ret) \ 114 113 __back->ops->op(__back, ##args); \ 114 + else \ 115 + dev_dbg(__back->dev, "Op(%s) not implemented\n",\ 116 + __stringify(op)); \ 115 117 } 116 118 117 119 /**