diff mbox series

[07/12] iio:accel:kionix drivers: Cleanup includes

Message ID 20210611171355.202903-8-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
Mixture of removing unused headers, adding some that are directly used
from the code and a few forwards definitions to avoid any potential
future issues with header ordering.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 drivers/iio/accel/kxcjk-1013.c | 4 +++-
 drivers/iio/accel/kxsd9-i2c.c  | 3 ---
 drivers/iio/accel/kxsd9-spi.c  | 5 +----
 drivers/iio/accel/kxsd9.c      | 1 -
 drivers/iio/accel/kxsd9.h      | 2 ++
 5 files changed, 6 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index a51fdd3c9b5b..e4813706a52a 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -5,13 +5,15 @@ 
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/device.h>
 #include <linux/bitops.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/acpi.h>
+#include <linux/mutex.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c
index b580d605f848..7e1d1158f80e 100644
--- a/drivers/iio/accel/kxsd9-i2c.c
+++ b/drivers/iio/accel/kxsd9-i2c.c
@@ -1,11 +1,8 @@ 
 // SPDX-License-Identifier: GPL-2.0
-#include <linux/device.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
-#include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/delay.h>
 #include <linux/regmap.h>
 
 #include "kxsd9.h"
diff --git a/drivers/iio/accel/kxsd9-spi.c b/drivers/iio/accel/kxsd9-spi.c
index 7971ec1eeb7e..78a168d5b1fa 100644
--- a/drivers/iio/accel/kxsd9-spi.c
+++ b/drivers/iio/accel/kxsd9-spi.c
@@ -1,11 +1,8 @@ 
 // SPDX-License-Identifier: GPL-2.0-only
-#include <linux/device.h>
 #include <linux/kernel.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/spi/spi.h>
 #include <linux/module.h>
-#include <linux/slab.h>
+#include <linux/mod_devicetable.h>
 #include <linux/regmap.h>
 
 #include "kxsd9.h"
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index bf7ed9e7d00f..3d15f590ed4a 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -14,7 +14,6 @@ 
 #include <linux/device.h>
 #include <linux/kernel.h>
 #include <linux/sysfs.h>
-#include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/regmap.h>
 #include <linux/bitops.h>
diff --git a/drivers/iio/accel/kxsd9.h b/drivers/iio/accel/kxsd9.h
index 5e3ca212f5be..172b756eb901 100644
--- a/drivers/iio/accel/kxsd9.h
+++ b/drivers/iio/accel/kxsd9.h
@@ -4,6 +4,8 @@ 
 
 #define KXSD9_STATE_RX_SIZE 2
 #define KXSD9_STATE_TX_SIZE 2
+struct device;
+struct regmap;
 
 int kxsd9_common_probe(struct device *dev,
 		       struct regmap *map,