Re: [PATCH 7/7] iio: pressure: dps310: include what the driver uses

From: Andy Shevchenko

Date: Tue Nov 24 2026 - 03:24:20 EST


On Tue, Nov 24, 2026 at 12:06:49AM +0200, Rupesh Majhi wrote:
> Include the headers for what the driver uses directly and drop
> linux/iio/sysfs.h, which it does not use.

Thanks, a few amendments may be made, see below.

...

> +#include <linux/array_size.h>
> #include <linux/bitfield.h>

> +#include <linux/bitops.h>
> +#include <linux/bits.h>

The former guarantees the latter, so drop bits.h.

> #include <linux/cleanup.h>
> +#include <linux/container_of.h>
> #include <linux/delay.h>
> +#include <linux/dev_printk.h>
> +#include <linux/device/devres.h>
> #include <linux/devm-helpers.h>

> +#include <linux/err.h>
> +#include <linux/errno.h>

Same here as long as the driver doesn't use special Linux error codes
( >= 512). And for now it doesn't.

> #include <linux/i2c.h>
> #include <linux/interrupt.h>
> #include <linux/irq.h>
> +#include <linux/jiffies.h>
> #include <linux/limits.h>
> +#include <linux/log2.h>
> #include <linux/math64.h>
> +#include <linux/minmax.h>

> +#include <linux/mod_devicetable.h>

Uwe already pointed out on this.

> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/overflow.h>
> #include <linux/regmap.h>
> #include <linux/slab.h>
> #include <linux/time.h>
> +#include <linux/types.h>
> #include <linux/unaligned.h>
> #include <linux/units.h>
> #include <linux/workqueue.h>

--
With Best Regards,
Andy Shevchenko