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/imu | |
parent | 7e6b78663c2fb96adaff613f2a25c177c7fbd3c4 (diff) | |
download | lwn-9c6cd755b548767ae1780fa41967ac602604d456.tar.gz lwn-9c6cd755b548767ae1780fa41967ac602604d456.zip |
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/imu')
-rw-r--r-- | drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 1 | ||||
-rw-r--r-- | drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 3 | ||||
-rw-r--r-- | drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c index 8204f7303fd7..5e6625140db7 100644 --- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c +++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c @@ -10,6 +10,7 @@ #include <linux/device.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/iio/common/st_sensors.h> diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c index 50a36ab53bc3..78bede358747 100644 --- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c +++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c @@ -10,7 +10,8 @@ #include <linux/i2c.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> +#include <linux/mod_devicetable.h> +#include <linux/regmap.h> #include <linux/iio/common/st_sensors_i2c.h> diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c index 272c88990dd0..180b54e66438 100644 --- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c +++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c @@ -9,7 +9,8 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> +#include <linux/mod_devicetable.h> +#include <linux/regmap.h> #include <linux/spi/spi.h> #include <linux/iio/common/st_sensors_spi.h> |