diff mbox series

[01/12] iio:accel:adxl372: Cleanup includes

Message ID 20210611171355.202903-2-jic23@kernel.org (mailing list archive)
State Superseded
Headers show
Series iio:accel: Header Cleanups. | expand

Commit Message

Jonathan Cameron June 11, 2021, 5:13 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Based on consideration of the output of include-what-you-use.
Drop some unused headers and include others that should probably be
there based on direct use.  Also a few forward definitions to avoid
any potential future include ordering issues.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
---
 drivers/iio/accel/adxl372.c     | 4 ++--
 drivers/iio/accel/adxl372.h     | 2 ++
 drivers/iio/accel/adxl372_spi.c | 3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)

Comments

Lars-Peter Clausen June 15, 2021, 1:16 p.m. UTC | #1
On 6/11/21 7:13 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Based on consideration of the output of include-what-you-use.
> Drop some unused headers and include others that should probably be
> there based on direct use.  Also a few forward definitions to avoid
> any potential future include ordering issues.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>


Acked-by:  Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> ---
>   drivers/iio/accel/adxl372.c     | 4 ++--
>   drivers/iio/accel/adxl372.h     | 2 ++
>   drivers/iio/accel/adxl372_spi.c | 3 +--
>   3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c
> index fc9592407717..c679cb9f3ed1 100644
> --- a/drivers/iio/accel/adxl372.c
> +++ b/drivers/iio/accel/adxl372.c
> @@ -6,12 +6,12 @@
>    */
>   
>   #include <linux/bitfield.h>
> +#include <linux/bitmap.h>
>   #include <linux/bitops.h>
>   #include <linux/interrupt.h>
> -#include <linux/irq.h>
>   #include <linux/module.h>
> +#include <linux/mutex.h>
>   #include <linux/regmap.h>
> -#include <linux/spi/spi.h>
>   
>   #include <linux/iio/iio.h>
>   #include <linux/iio/sysfs.h>
> diff --git a/drivers/iio/accel/adxl372.h b/drivers/iio/accel/adxl372.h
> index 80a0aa9714fc..86bf8955d60c 100644
> --- a/drivers/iio/accel/adxl372.h
> +++ b/drivers/iio/accel/adxl372.h
> @@ -9,6 +9,8 @@
>   #define _ADXL372_H_
>   
>   #define ADXL372_REVID	0x03
> +struct device;
> +struct regmap;
>   
>   int adxl372_probe(struct device *dev, struct regmap *regmap,
>   		  int irq, const char *name);
> diff --git a/drivers/iio/accel/adxl372_spi.c b/drivers/iio/accel/adxl372_spi.c
> index 1f1352fee99a..927379f9b497 100644
> --- a/drivers/iio/accel/adxl372_spi.c
> +++ b/drivers/iio/accel/adxl372_spi.c
> @@ -6,9 +6,8 @@
>    */
>   
>   #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>   #include <linux/regmap.h>
> -#include <linux/of.h>
> -#include <linux/of_device.h>
>   #include <linux/spi/spi.h>
>   
>   #include "adxl372.h"
diff mbox series

Patch

diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c
index fc9592407717..c679cb9f3ed1 100644
--- a/drivers/iio/accel/adxl372.c
+++ b/drivers/iio/accel/adxl372.c
@@ -6,12 +6,12 @@ 
  */
 
 #include <linux/bitfield.h>
+#include <linux/bitmap.h>
 #include <linux/bitops.h>
 #include <linux/interrupt.h>
-#include <linux/irq.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/regmap.h>
-#include <linux/spi/spi.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
diff --git a/drivers/iio/accel/adxl372.h b/drivers/iio/accel/adxl372.h
index 80a0aa9714fc..86bf8955d60c 100644
--- a/drivers/iio/accel/adxl372.h
+++ b/drivers/iio/accel/adxl372.h
@@ -9,6 +9,8 @@ 
 #define _ADXL372_H_
 
 #define ADXL372_REVID	0x03
+struct device;
+struct regmap;
 
 int adxl372_probe(struct device *dev, struct regmap *regmap,
 		  int irq, const char *name);
diff --git a/drivers/iio/accel/adxl372_spi.c b/drivers/iio/accel/adxl372_spi.c
index 1f1352fee99a..927379f9b497 100644
--- a/drivers/iio/accel/adxl372_spi.c
+++ b/drivers/iio/accel/adxl372_spi.c
@@ -6,9 +6,8 @@ 
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/regmap.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/spi/spi.h>
 
 #include "adxl372.h"