[PATCH 13/14] iio: pressure: mprls0025pa: cleanup includes and forward declarations

Petre Rodan posted 14 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 13/14] iio: pressure: mprls0025pa: cleanup includes and forward declarations
Posted by Petre Rodan 1 month, 3 weeks ago
Remove unused headers and add required headers as needed.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
---
 drivers/iio/pressure/mprls0025pa.c | 4 ++++
 drivers/iio/pressure/mprls0025pa.h | 6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c
index fc04988b9437..71728f9fc498 100644
--- a/drivers/iio/pressure/mprls0025pa.c
+++ b/drivers/iio/pressure/mprls0025pa.c
@@ -12,9 +12,12 @@
 #include <linux/array_size.h>
 #include <linux/bitfield.h>
 #include <linux/bits.h>
+#include <linux/completion.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/export.h>
 #include <linux/interrupt.h>
+#include <linux/jiffies.h>
 #include <linux/math64.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
@@ -26,6 +29,7 @@
 #include <linux/gpio/consumer.h>
 
 #include <linux/iio/buffer.h>
+#include <linux/iio/iio.h>
 #include <linux/iio/trigger_consumer.h>
 #include <linux/iio/triggered_buffer.h>
 
diff --git a/drivers/iio/pressure/mprls0025pa.h b/drivers/iio/pressure/mprls0025pa.h
index 2bdffe1e0eb1..ccd252f64351 100644
--- a/drivers/iio/pressure/mprls0025pa.h
+++ b/drivers/iio/pressure/mprls0025pa.h
@@ -12,9 +12,6 @@
 #define _MPRLS0025PA_H
 
 #include <linux/completion.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/stddef.h>
 #include <linux/types.h>
 
 #include <linux/iio/iio.h>
@@ -23,9 +20,6 @@
 
 struct device;
 
-struct iio_chan_spec;
-struct iio_dev;
-
 struct mpr_data;
 struct mpr_ops;
 

-- 
2.51.2
Re: [PATCH 13/14] iio: pressure: mprls0025pa: cleanup includes and forward declarations
Posted by Marcelo Schmitt 1 month, 3 weeks ago
On 12/18, Petre Rodan wrote:
> Remove unused headers and add required headers as needed.
Bring the patches that fix something to the beginning of the series and
bring this one right after the fixes.

> 
> Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
> ---
...
>  
> diff --git a/drivers/iio/pressure/mprls0025pa.h b/drivers/iio/pressure/mprls0025pa.h
> index 2bdffe1e0eb1..ccd252f64351 100644
> --- a/drivers/iio/pressure/mprls0025pa.h
> +++ b/drivers/iio/pressure/mprls0025pa.h
> @@ -12,9 +12,6 @@
>  #define _MPRLS0025PA_H
>  
>  #include <linux/completion.h>
> -#include <linux/delay.h>
> -#include <linux/device.h>
> -#include <linux/stddef.h>
>  #include <linux/types.h>
>  
>  #include <linux/iio/iio.h>
> @@ -23,9 +20,6 @@
>  
>  struct device;
>  
> -struct iio_chan_spec;
> -struct iio_dev;
> -
Also, I'd suggest to not mess with other stuff if this patch is supposedly only
organizing/cleaning up includes.

>  struct mpr_data;
>  struct mpr_ops;