iio: gyro: header cleanups
Subsystems (2)
v2 cover iio: gyro: header cleanups
Remove any kernel.h occurences in gyro/ and update the headers in accordance with IWYU (at least loosely).
---
Changes in v2:
- Address Sashiko review: a few missing and unused includes.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Joshua Crofts (2):
iio: gyro: adis16080: apply iwyu principle
iio: gyro: adis16136: apply iwyu principle
drivers/iio/gyro/adis16080.c | 13 ++++++++----- drivers/iio/gyro/adis16136.c | 12 +++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-)
---
base-commit: a6d01d696125566b722cde7293fb1735b7866be1
change-id: 20261120-gyro-kernel-header-removal-7e7ce8b60656
Best regards,
Signature · 1 line
Joshua Crofts
PATCH v2 1/2 iio: gyro: adis16080: apply iwyu principle
Remove the catch all kernel.h header and add/remove the remaining headers in accordance with the IWYU principle.
--- drivers/iio/gyro/adis16080.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/iio/gyro/adis16080.c +8 -5
@@ -4,17 +4,20 @@* * Copyright 2010 Analog Devices Inc. */ -#include <linux/delay.h> + +#include <linux/array_size.h> +#include <linux/bitops.h> #include <linux/device.h> -#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/math.h> #include <linux/module.h> #include <linux/mutex.h> -#include <linux/slab.h> #include <linux/spi/spi.h> -#include <linux/sysfs.h> +#include <linux/types.h> + +#include <asm/byteorder.h> #include <linux/iio/iio.h> -#include <linux/iio/sysfs.h> #define ADIS16080_DIN_GYRO (0 << 10)/* Gyroscope output */ #define ADIS16080_DIN_TEMP (1 << 10)/* Temperature output */
Signature · 1 line
2.56.0
PATCH v2 2/2 iio: gyro: adis16136: apply iwyu principle
In reply to Joshua CroftsRemove the catch all kernel.h header and add/remove the remaining headers in accordance with the IWYU principle.
--- drivers/iio/gyro/adis16136.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/iio/gyro/adis16136.c +9 -3
@@ -6,17 +6,23 @@* Author: Lars-Peter Clausen <[email protected]> */ +#include <linux/array_size.h> +#include <linux/bitops.h> +#include <linux/debugfs.h> #include <linux/device.h> -#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/kstrtox.h> +#include <linux/module.h> #include <linux/spi/spi.h> +#include <linux/sprintf.h> +#include <linux/stat.h> #include <linux/sysfs.h> -#include <linux/module.h> +#include <linux/types.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/iio/imu/adis.h> -#include <linux/debugfs.h> #define ADIS16136_REG_FLASH_CNT 0x00#define ADIS16136_REG_TEMP_OUT 0x02
Signature · 1 line
2.56.0
Jonathan Cameron
maintainerQuoted 4 lines · On Sun, 29 Nov 2026 20:33:35 +0100 Joshua Crofts <[email protected]> wrote:
Remove any
kernel.hoccurences in gyro/ and update the headers in accordance with IWYU (at least loosely).Signed-off-by Joshua Crofts <[email protected]>
Sashiko failed to apply. I can't be bothered to figure out why. This addressed the appropriate bits of what it called out on v1 so applied to the testing branch of iio.git.
Thanks,
Jonathan
Quoted 18 lines
---
Changes in v2:
- Address Sashiko review: a few missing and unused includes.
- Link to v1: https://lore.kernel.org/r/[email protected]---
Joshua Crofts (2):
iio: gyro: adis16080: apply iwyu principle
iio: gyro: adis16136: apply iwyu principledrivers/iio/gyro/adis16080.c | 13 ++++++++----- drivers/iio/gyro/adis16136.c | 12 +++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-)---
base-commit:a6d01d696125566b722cde7293fb1735b7866be1
change-id: 20261120-gyro-kernel-header-removal-7e7ce8b60656Best regards,
Quoted 10 lines · Jonathan Cameron
Quoted 4 lines · On Sun, 29 Nov 2026 20:33:35 +0100 Joshua Crofts <[email protected]> wrote:
Remove any
kernel.hoccurences in gyro/ and update the headers in accordance with IWYU (at least loosely).Signed-off-by Joshua Crofts <[email protected]>Sashiko failed to apply. I can't be bothered to figure out why. This addressed the appropriate bits of what it called out on v1 so applied to the testing branch of iio.git.
Bad rebase unfortunately. Luckily nobody touched the drivers in the meantime.
Thanks.
Signature · 2 lines
Kind regards, Joshua Crofts