diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-06-08 18:51:49 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-07-24 15:59:00 +0100 |
commit | 9c6cd755b548767ae1780fa41967ac602604d456 (patch) | |
tree | 695bcc35552a1b0164bfef1bce432de779b674ed /drivers/iio/gyro | |
parent | 7e6b78663c2fb96adaff613f2a25c177c7fbd3c4 (diff) |
iio: st-sensors: Remove some unused includes and add some that should be there
The st-sensors drivers have changed in structure over time, and includes
have not always kept up with this. Let's bring them back to nearer
the ideal.
Identified with the include-what-you-use tool and careful checking of
its suggestions.
Note I haven't been particularly aggressive here, so this is just the
cases where the include obviously isn't needed rather than the more
subtle corners.
Note I took the opportunity to add mod_devicetable.h as I generally
prefer to see that when acpi or of match tables are present.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210608175149.4019289-1-jic23@kernel.org
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r-- | drivers/iio/gyro/st_gyro_buffer.c | 7 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_core.c | 9 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_i2c.c | 2 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_spi.c | 2 |
4 files changed, 5 insertions, 15 deletions
diff --git a/drivers/iio/gyro/st_gyro_buffer.c b/drivers/iio/gyro/st_gyro_buffer.c index 4feb7ada7195..02b5562b6585 100644 --- a/drivers/iio/gyro/st_gyro_buffer.c +++ b/drivers/iio/gyro/st_gyro_buffer.c @@ -9,14 +9,9 @@ #include <linux/module.h> #include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/stat.h> -#include <linux/interrupt.h> -#include <linux/i2c.h> -#include <linux/delay.h> #include <linux/iio/iio.h> #include <linux/iio/buffer.h> -#include <linux/iio/trigger_consumer.h> +#include <linux/iio/trigger.h> #include <linux/iio/triggered_buffer.h> #include <linux/iio/common/st_sensors.h> diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c index b86ee4d940d9..fe227ad400f0 100644 --- a/drivers/iio/gyro/st_gyro_core.c +++ b/drivers/iio/gyro/st_gyro_core.c @@ -9,17 +9,12 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> -#include <linux/errno.h> -#include <linux/types.h> +#include <linux/mutex.h> #include <linux/interrupt.h> -#include <linux/i2c.h> -#include <linux/irq.h> -#include <linux/delay.h> +#include <linux/sysfs.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/iio/trigger.h> -#include <linux/iio/buffer.h> #include <linux/iio/common/st_sensors.h> #include "st_gyro.h" diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c index a25cc0379e16..3ef86e16ee65 100644 --- a/drivers/iio/gyro/st_gyro_i2c.c +++ b/drivers/iio/gyro/st_gyro_i2c.c @@ -9,7 +9,7 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> +#include <linux/mod_devicetable.h> #include <linux/i2c.h> #include <linux/iio/iio.h> diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c index 18d6a2aeda45..41d835493347 100644 --- a/drivers/iio/gyro/st_gyro_spi.c +++ b/drivers/iio/gyro/st_gyro_spi.c @@ -9,7 +9,7 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> +#include <linux/mod_devicetable.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> |