diff mbox series

[10/12] iio:accel:memsic drivers: Cleanup includes

Message ID 20210611171355.202903-11-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 the include-what-you-use tool.
Mixture of removing unused headers and adding includes for some of those
directly used in these files.

There are no hard rules on when to include a header and when to assume
it is included by another one.  This is an attempt to be more consistent
in IIO on that choice.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/accel/mxc4005.c | 4 ++++
 drivers/iio/accel/mxc6255.c | 5 ++---
 2 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c
index b3afbf064915..2f4c9bdbfc9e 100644
--- a/drivers/iio/accel/mxc4005.c
+++ b/drivers/iio/accel/mxc4005.c
@@ -9,6 +9,10 @@ 
 #include <linux/i2c.h>
 #include <linux/iio/iio.h>
 #include <linux/acpi.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
 #include <linux/regmap.h>
 #include <linux/iio/sysfs.h>
 #include <linux/iio/trigger.h>
diff --git a/drivers/iio/accel/mxc6255.c b/drivers/iio/accel/mxc6255.c
index 9aeeadc420d3..9ab0c66636a7 100644
--- a/drivers/iio/accel/mxc6255.c
+++ b/drivers/iio/accel/mxc6255.c
@@ -8,13 +8,12 @@ 
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
-#include <linux/init.h>
 #include <linux/iio/iio.h>
-#include <linux/delay.h>
+#include <linux/kernel.h>
 #include <linux/acpi.h>
 #include <linux/regmap.h>
-#include <linux/iio/sysfs.h>
 
 #define MXC6255_DRV_NAME		"mxc6255"
 #define MXC6255_REGMAP_NAME		"mxc6255_regmap"