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/common | |
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/common')
6 files changed, 4 insertions, 7 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c index 802f9ae04cf4..dccc471e79da 100644 --- a/drivers/iio/common/st_sensors/st_sensors_buffer.c +++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c @@ -9,13 +9,11 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h> #include <linux/interrupt.h> #include <linux/iio/buffer.h> #include <linux/iio/trigger_consumer.h> -#include <linux/iio/triggered_buffer.h> #include <linux/irqreturn.h> #include <linux/regmap.h> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index 7a69c1be7393..0bbb090b108c 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.c +++ b/drivers/iio/common/st_sensors/st_sensors_core.c @@ -12,6 +12,7 @@ #include <linux/slab.h> #include <linux/delay.h> #include <linux/iio/iio.h> +#include <linux/mutex.h> #include <linux/property.h> #include <linux/regulator/consumer.h> #include <linux/regmap.h> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.h b/drivers/iio/common/st_sensors/st_sensors_core.h index e8894be55660..09f3e602a2e2 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.h +++ b/drivers/iio/common/st_sensors/st_sensors_core.h @@ -4,6 +4,7 @@ */ #ifndef __ST_SENSORS_CORE_H #define __ST_SENSORS_CORE_H +struct iio_dev; int st_sensors_write_data_with_mask(struct iio_dev *indio_dev, u8 reg_addr, u8 mask, u8 data); #endif diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index b9e59ad32a02..b3ff88700866 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -7,15 +7,14 @@ * Denis Ciocca <denis.ciocca@st.com> */ +#include <linux/i2c.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/iio/iio.h> #include <linux/regmap.h> #include <linux/iio/common/st_sensors_i2c.h> - #define ST_SENSORS_I2C_MULTIREAD 0x80 static const struct regmap_config st_sensors_i2c_regmap_config = { diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c index 48fc41dc5633..0d1d66c77cd8 100644 --- a/drivers/iio/common/st_sensors/st_sensors_spi.c +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c @@ -9,13 +9,12 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/iio/iio.h> #include <linux/property.h> #include <linux/regmap.h> +#include <linux/spi/spi.h> #include <linux/iio/common/st_sensors_spi.h> -#include "st_sensors_core.h" #define ST_SENSORS_SPI_MULTIREAD 0xc0 diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index 0b511665dee5..64e0a748a855 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -9,7 +9,6 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h> #include <linux/interrupt.h> |