[PATCH v2 04/11] iio: temperature: mlx90632: make headers conform to IWYU
From: Joshua Crofts
Date: Sat Aug 29 2026 - 12:26:23 EST
Remove the catch-all kernel.h header and add the missing headers to
enforce IWYU.
Additionally, sort the entries alphabetically.
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
Header changes explained:
Added:
- <linux/array_size.h>: for ARRAY_SIZE()
- <linux/bits.h>: for GENMASK() and BIT() macros
- <linux/dev_printk.h>: for dev_err(), dev_info(), etc.
- <linux/mutex.h>: for struct mutex and mutex_lock/unlock
- <linux/types.h>: for fixed-width integer types (u8, u16, etc.)
Removed:
- <linux/gpio/consumer.h>: not directly used in this driver
- <linux/kernel.h>: catch-all header no longer needed
---
drivers/iio/temperature/mlx90632.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
index 2fde48f337e2..74ae36f74e8b 100644
--- a/drivers/iio/temperature/mlx90632.c
+++ b/drivers/iio/temperature/mlx90632.c
@@ -6,21 +6,25 @@
*
* Driver for the Melexis MLX90632 I2C 16-bit IR thermopile sensor
*/
+
+#include <linux/array_size.h>
#include <linux/bitfield.h>
+#include <linux/bits.h>
#include <linux/delay.h>
+#include <linux/dev_printk.h>
#include <linux/device.h>
#include <linux/err.h>
-#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/iopoll.h>
#include <linux/jiffies.h>
-#include <linux/kernel.h>
#include <linux/limits.h>
-#include <linux/module.h>
#include <linux/math64.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/types.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
--
2.55.0