Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: amplifiers: ad8366: refactor include headers

Apply IWYU principle, removing the following headers:
- linux/device.h: no usage of devm_add_action_or_reset, device_attr...
- linux/kernel.h: no usage of container_of, kasprintf, ...
- linux/slab.h: memory management handled by iio
- linux/sysfs.h: sysfs interaction is managed by iio
- linux/iio/sysfs.h: not using iio device attributes in this driver
Adding the following missing headers:
+ linux/array_size.h: for ARRAY_SIZE
+ linux/bits.h: for BIT
+ linux/dev_printk.h: for dev_err
+ linux/math.h: for abs
+ linux/mutex.h: for mutex_lock, mutex_unlock
+ linux/mod_devicetable.h: for spi_device_id
+ linux/types.h for NULL, __aligned

Additionally, those include directives are alphabetically sorted.

Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Rodrigo Alencar and committed by
Jonathan Cameron
5593bddb 3cfbb50d

+13 -10
+13 -10
drivers/iio/amplifiers/ad8366.c
··· 11 11 * Copyright 2012-2019 Analog Devices Inc. 12 12 */ 13 13 14 - #include <linux/device.h> 15 - #include <linux/kernel.h> 16 - #include <linux/slab.h> 17 - #include <linux/sysfs.h> 18 - #include <linux/spi/spi.h> 19 - #include <linux/regulator/consumer.h> 20 - #include <linux/gpio/consumer.h> 21 - #include <linux/err.h> 22 - #include <linux/module.h> 14 + #include <linux/array_size.h> 23 15 #include <linux/bitrev.h> 16 + #include <linux/bits.h> 17 + #include <linux/dev_printk.h> 18 + #include <linux/err.h> 19 + #include <linux/gpio/consumer.h> 20 + #include <linux/math.h> 21 + #include <linux/minmax.h> 22 + #include <linux/mod_devicetable.h> 23 + #include <linux/module.h> 24 + #include <linux/mutex.h> 25 + #include <linux/regulator/consumer.h> 26 + #include <linux/spi/spi.h> 27 + #include <linux/types.h> 24 28 25 29 #include <linux/iio/iio.h> 26 - #include <linux/iio/sysfs.h> 27 30 28 31 enum ad8366_type { 29 32 ID_AD8366,