diff mbox series

[11/12] iio:accel:murata/vti drivers: Include cleanups for the sca**** parts.

Message ID 20210611171355.202903-12-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.
Some unused includes dropped and some that are directly used in the
files added.

There are no hard rules for when we should rely on includes being
there as part of including another header and when we should do them
directly.  This is part of an attempt to be more consistent on that
in IIO.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomas Melin <tomas.melin@vaisala.com>
---
 drivers/iio/accel/sca3000.c | 5 ++---
 drivers/iio/accel/sca3300.c | 3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Tomas Melin June 14, 2021, 7:15 a.m. UTC | #1
On 6/11/21 8:13 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Based on consideration of the output of include-what-you-use.
> Some unused includes dropped and some that are directly used in the
> files added.
>
> There are no hard rules for when we should rely on includes being
> there as part of including another header and when we should do them
> directly.  This is part of an attempt to be more consistent on that
> in IIO.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Tomas Melin <tomas.melin@vaisala.com>
> ---
>   drivers/iio/accel/sca3000.c | 5 ++---
>   drivers/iio/accel/sca3300.c | 3 ++-
>   2 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>


>
> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
> index cb753a43533c..9f4bbf23834f 100644
> --- a/drivers/iio/accel/sca3000.c
> +++ b/drivers/iio/accel/sca3000.c
> @@ -8,14 +8,13 @@
>    */
>   
>   #include <linux/interrupt.h>
> -#include <linux/fs.h>
>   #include <linux/device.h>
> -#include <linux/slab.h>
>   #include <linux/kernel.h>
>   #include <linux/spi/spi.h>
>   #include <linux/sysfs.h>
>   #include <linux/module.h>
> -#include <linux/uaccess.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/mutex.h>
>   #include <linux/iio/iio.h>
>   #include <linux/iio/sysfs.h>
>   #include <linux/iio/events.h>
> diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c
> index f7ef8ecfd34a..2042d8baf7b8 100644
> --- a/drivers/iio/accel/sca3300.c
> +++ b/drivers/iio/accel/sca3300.c
> @@ -10,13 +10,14 @@
>   #include <linux/delay.h>
>   #include <linux/kernel.h>
>   #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/mutex.h>
>   #include <linux/spi/spi.h>
>   
>   #include <asm/unaligned.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 mbox series

Patch

diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
index cb753a43533c..9f4bbf23834f 100644
--- a/drivers/iio/accel/sca3000.c
+++ b/drivers/iio/accel/sca3000.c
@@ -8,14 +8,13 @@ 
  */
 
 #include <linux/interrupt.h>
-#include <linux/fs.h>
 #include <linux/device.h>
-#include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/spi/spi.h>
 #include <linux/sysfs.h>
 #include <linux/module.h>
-#include <linux/uaccess.h>
+#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/iio/events.h>
diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c
index f7ef8ecfd34a..2042d8baf7b8 100644
--- a/drivers/iio/accel/sca3300.c
+++ b/drivers/iio/accel/sca3300.c
@@ -10,13 +10,14 @@ 
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
 #include <linux/spi/spi.h>
 
 #include <asm/unaligned.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>