linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] iio: Make possible to include driver.h first
@ 2019-03-26 13:47 Andy Shevchenko
  2019-03-30 15:04 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2019-03-26 13:47 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: 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.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/iio/driver.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/iio/driver.h b/include/linux/iio/driver.h
index 7dfb10ee2669..f54a7bcdefe3 100644
--- a/include/linux/iio/driver.h
+++ b/include/linux/iio/driver.h
@@ -11,6 +11,7 @@
 #ifndef _IIO_INKERN_H_
 #define _IIO_INKERN_H_
 
+struct iio_dev;
 struct iio_map;
 
 /**
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] iio: Make possible to include driver.h first
  2019-03-26 13:47 [PATCH v1] iio: Make possible to include driver.h first Andy Shevchenko
@ 2019-03-30 15:04 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-03-30 15:04 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-iio, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler

On Tue, 26 Mar 2019 15:47:00 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> 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.
> 
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied, 

Thanks,

Jonathan

> ---
>  include/linux/iio/driver.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/iio/driver.h b/include/linux/iio/driver.h
> index 7dfb10ee2669..f54a7bcdefe3 100644
> --- a/include/linux/iio/driver.h
> +++ b/include/linux/iio/driver.h
> @@ -11,6 +11,7 @@
>  #ifndef _IIO_INKERN_H_
>  #define _IIO_INKERN_H_
>  
> +struct iio_dev;
>  struct iio_map;
>  
>  /**


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-30 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-26 13:47 [PATCH v1] iio: Make possible to include driver.h first Andy Shevchenko
2019-03-30 15:04 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).