Skip to contentSkip to conversation

iio: Make possible to include driver.h first

PATCH Applied Andy Shevchenko 2 participants 2 messages Mar 26, 2019 – Mar 30, 2019 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: Make possible to include driver.h first

If we put headers alphabetically sorted in the IIO driver, the compilation will abort because of unknown type to handle.

Simple add a forward declaration of opaque struct iio_dev.

---
 include/linux/iio/driver.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/iio/driver.h +1 -0
index 7dfb10ee2669..f54a7bcdefe3 100644
@@ -11,6 +11,7 @@
 #ifndef _IIO_INKERN_H_
 #define _IIO_INKERN_H_
 
+struct iio_dev;
 struct iio_map;
 
 /**
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 7 lines · On Tue, 26 Mar 2019 15:47:00 +0200 Andy Shevchenko…

If we put headers alphabetically sorted in the IIO driver, the compilation will abort because of unknown type to handle.

Simple add a forward declaration of opaque struct iio_dev.

Applied,

Thanks,

Jonathan

Quoted 16 lines
---
 include/linux/iio/driver.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/iio/driver.h +1 -0
index 7dfb10ee2669..f54a7bcdefe3 100644
@@ -11,6 +11,7 @@
 #ifndef _IIO_INKERN_H_
 #define _IIO_INKERN_H_
 
+struct iio_dev;
 struct iio_map;
 
 /**