iio: gts-helper: fix error headers

Both industrialio-gts-helper.c and iio-gts-helper.h use error codes
defined in <asm-generic/errno-base.h> (usually included via
<linux/errno.h>), but only industrialio-gts-helper.c includes it. On the
other hand, that file also uses error macros like IS_ERR() and
PTR_ERR(), which are included in <linux/err.h>.

Add the right includes to provide the used elements from the error
headers:

- <linux/errno.h> in iio-gts-helper.h

- <linux/err.h> in industrialio-gts-helper.c, which in turn includes
  <asm/errno.h>, which only includes <asm-generic/errno-base.h>

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
This commit is contained in:
Javier Carrasco 2026-08-15 00:23:47 +02:00 committed by Jonathan Cameron
parent 70d734e95d
commit 43f6883a4d
2 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@
*/
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/minmax.h>
#include <linux/module.h>

View File

@ -7,6 +7,7 @@
#ifndef __IIO_GTS_HELPER__
#define __IIO_GTS_HELPER__
#include <linux/errno.h>
#include <linux/types.h>
struct device;