All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Dan Robertson <dan@dlrobertson.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mike Looijmans <mike.looijmans@topic.nl>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH 03/12] iio:accel:bosch drivers: Cleanup includes
Date: Fri, 11 Jun 2021 18:13:45 +0100	[thread overview]
Message-ID: <20210611171355.202903-4-jic23@kernel.org> (raw)
In-Reply-To: <20210611171355.202903-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Based on consideration of the output of the include-what-you-use tool.
Remove unused headers and add some that are directly used in the
files.

There are no hard rules on when to use direct includes and when to
rely on a chain of headers.  Here I'm trying to make those
decisions approximately the same across IIO.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Dan Robertson <dan@dlrobertson.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/accel/bma180.c            | 4 ++--
 drivers/iio/accel/bma220_spi.c        | 2 +-
 drivers/iio/accel/bma400_core.c       | 1 -
 drivers/iio/accel/bma400_spi.c        | 1 -
 drivers/iio/accel/bmc150-accel-core.c | 1 +
 drivers/iio/accel/bmc150-accel-spi.c  | 1 -
 drivers/iio/accel/bmi088-accel-core.c | 3 ---
 drivers/iio/accel/bmi088-accel-spi.c  | 3 ++-
 8 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 0e0d9317c084..2042cf86b199 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -14,14 +14,14 @@
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/property.h>
+#include <linux/mutex.h>
 #include <linux/bitops.h>
 #include <linux/regulator/consumer.h>
-#include <linux/slab.h>
-#include <linux/string.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/iio/buffer.h>
diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index 0622c7936499..c447463d0844 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -9,11 +9,11 @@
 #include <linux/kernel.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/spi/spi.h>
 
 #include <linux/iio/buffer.h>
 #include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
 #include <linux/iio/trigger_consumer.h>
 #include <linux/iio/triggered_buffer.h>
 
diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c
index 21520e022a21..8595dd666c44 100644
--- a/drivers/iio/accel/bma400_core.c
+++ b/drivers/iio/accel/bma400_core.c
@@ -14,7 +14,6 @@
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c
index 7c2825904e08..0ae3d1a203b4 100644
--- a/drivers/iio/accel/bma400_spi.c
+++ b/drivers/iio/accel/bma400_spi.c
@@ -6,7 +6,6 @@
  *
  */
 #include <linux/bits.h>
-#include <linux/init.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/regmap.h>
diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index 46ab7675186c..06e396b66e02 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>
+#include <linux/mutex.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/iio/iio.h>
diff --git a/drivers/iio/accel/bmc150-accel-spi.c b/drivers/iio/accel/bmc150-accel-spi.c
index 74a8aee4f612..0786c9a0dcbb 100644
--- a/drivers/iio/accel/bmc150-accel-spi.c
+++ b/drivers/iio/accel/bmc150-accel-spi.c
@@ -4,7 +4,6 @@
  * Copyright © 2015 Pengutronix, Markus Pargmann <mpa@pengutronix.de>
  */
 
-#include <linux/device.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/acpi.h>
diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index a06dae5c971d..d50db25cce64 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -8,13 +8,10 @@
 
 #include <linux/delay.h>
 #include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
-#include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
-#include <linux/slab.h>
 #include <asm/unaligned.h>
 
 #include "bmi088-accel.h"
diff --git a/drivers/iio/accel/bmi088-accel-spi.c b/drivers/iio/accel/bmi088-accel-spi.c
index dd1e3f6cf211..ae999c08e038 100644
--- a/drivers/iio/accel/bmi088-accel-spi.c
+++ b/drivers/iio/accel/bmi088-accel-spi.c
@@ -6,9 +6,10 @@
  * Copyright (c) 2018-2020, Topic Embedded Products
  */
 
+#include <linux/bits.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/regmap.h>
-#include <linux/slab.h>
 #include <linux/spi/spi.h>
 
 #include "bmi088-accel.h"
-- 
2.31.1


  parent reply	other threads:[~2021-06-11 17:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 17:13 [PATCH 00/12] iio:accel: Header Cleanups Jonathan Cameron
2021-06-11 17:13 ` [PATCH 01/12] iio:accel:adxl372: Cleanup includes Jonathan Cameron
2021-06-15 13:16   ` Lars-Peter Clausen
2021-06-11 17:13 ` [PATCH 02/12] iio:accel:bma180: Use generic device properties Jonathan Cameron
2021-06-11 21:48   ` Linus Walleij
2021-06-11 17:13 ` Jonathan Cameron [this message]
2021-06-11 17:13 ` [PATCH 04/12] iio:accel:miramems drivers: Cleanup headers Jonathan Cameron
2021-06-11 17:13 ` [PATCH 05/12] iio:accel:domintech: Cleanup includes Jonathan Cameron
2021-06-11 17:13 ` [PATCH 06/12] iio:accel:fxls8962af: Add a few missing includes Jonathan Cameron
2021-06-14  5:57   ` Sean Nyekjaer
2021-06-11 17:13 ` [PATCH 07/12] iio:accel:kionix drivers: Cleanup includes Jonathan Cameron
2021-06-11 17:13 ` [PATCH 08/12] iio:accel:mc3220: " Jonathan Cameron
2021-06-11 17:13 ` [PATCH 09/12] iio:accel:freescale drivers: " Jonathan Cameron
2021-06-11 17:13 ` [PATCH 10/12] iio:accel:memsic " Jonathan Cameron
2021-06-11 17:13 ` [PATCH 11/12] iio:accel:murata/vti drivers: Include cleanups for the sca**** parts Jonathan Cameron
2021-06-14  7:15   ` Tomas Melin
2021-06-11 17:13 ` [PATCH 12/12] iio:accel:sensortek drivers: Add some includes Jonathan Cameron
2021-06-11 17:48 ` [PATCH 00/12] iio:accel: Header Cleanups Andy Shevchenko
2021-06-11 18:23   ` Jonathan Cameron
2021-06-11 18:35     ` Andy Shevchenko
2021-06-11 19:19       ` Jonathan Cameron
2021-06-11 19:36         ` Andy Shevchenko
2021-06-11 20:10           ` Jonathan Cameron
2021-06-15  9:13             ` Rong Chen
2021-06-15 13:12 ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611171355.202903-4-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan@dlrobertson.com \
    --cc=hdegoede@redhat.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --subject='Re: [PATCH 03/12] iio:accel:bosch drivers: Cleanup includes' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.