drivers/iio/accel/stk8312.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
From: Miao Li <limiao@kylinos.cn>
Update the list of included headers in stk8312.c using
Include-What-You-Use (IWYU) tool, mainly to remove kernel.h
and add missing headers such as array_size.h, bits.h,
dev_printk.h, etc.
Signed-off-by: Miao Li <limiao@kylinos.cn>
---
drivers/iio/accel/stk8312.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c
index f31c6ab3392d..bcfdc92b7f81 100644
--- a/drivers/iio/accel/stk8312.c
+++ b/drivers/iio/accel/stk8312.c
@@ -7,11 +7,18 @@
* IIO driver for STK8312; 7-bit I2C address: 0x3D.
*/
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/delay.h>
+#include <linux/dev_printk.h>
+#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
-#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/delay.h>
+#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
+#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
@@ -19,6 +26,7 @@
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
+#include <linux/iio/types.h>
#define STK8312_REG_XOUT 0x00
#define STK8312_REG_YOUT 0x01
--
2.25.1
On Wed, Jun 03, 2026 at 09:47:54AM +0800, Miao Li wrote: > Update the list of included headers in stk8312.c using > Include-What-You-Use (IWYU) tool, mainly to remove kernel.h > and add missing headers such as array_size.h, bits.h, > dev_printk.h, etc. Same comments as per your other patch. -- With Best Regards, Andy Shevchenko
On Wed, 3 Jun 2026 08:53:24 +0300 Andy Shevchenko <andriy.shevchenko@intel.com> wrote: > On Wed, Jun 03, 2026 at 09:47:54AM +0800, Miao Li wrote: > > > Update the list of included headers in stk8312.c using > > Include-What-You-Use (IWYU) tool, mainly to remove kernel.h > > and add missing headers such as array_size.h, bits.h, > > dev_printk.h, etc. > > Same comments as per your other patch. > Main take away here is if you are sending a new type of change, test the waters (and get initial feedback) on that change applied to a single driver. That way you don't waste your time or that of reviewers on common problems. Thanks, Jonathan
© 2016 - 2026 Red Hat, Inc.