On 6/11/21 7:13 PM, Jonathan Cameron wrote:
From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
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@xxxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
Cc: Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>
Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
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"