leds: Explicitly include correct DT includes
Subsystems (3)
PATCH 1/1 leds: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
--- drivers/leds/leds-ariel.c | 2 +- drivers/leds/leds-cpcap.c | 2 +- drivers/leds/leds-cr0014114.c | 2 +- drivers/leds/leds-is31fl32xx.c | 1 - drivers/leds/leds-mlxreg.c | 1 - drivers/leds/leds-pca9532.c | 1 - drivers/leds/leds-pm8058.c | 1 - drivers/leds/leds-pwm.c | 2 +- drivers/leds/leds-spi-byte.c | 2 +- drivers/leds/leds-syscon.c | 3 +-- drivers/leds/leds-ti-lmu-common.c | 2 +- drivers/leds/leds-tlc591xx.c | 1 - drivers/leds/rgb/leds-qcom-lpg.c | 1 - 13 files changed, 7 insertions(+), 14 deletions(-)
drivers/leds/leds-ariel.c +1 -1
@@ -7,8 +7,8 @@#include <linux/module.h> #include <linux/leds.h> +#include <linux/platform_device.h> #include <linux/regmap.h> -#include <linux/of_platform.h> enum ec_index {EC_BLUE_LED =0x01 ,
drivers/leds/leds-cpcap.c +1 -1
@@ -7,7 +7,7 @@#include <linux/mfd/motorola-cpcap.h> #include <linux/module.h> #include <linux/mutex.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h>
drivers/leds/leds-cr0014114.c +1 -1
@@ -4,8 +4,8 @@#include <linux/delay.h> #include <linux/leds.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/workqueue.h>
drivers/leds/leds-is31fl32xx.c +0 -1
@@ -15,7 +15,6 @@#include <linux/leds.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> /* Used to indicate a device has no such register */ #define IS31FL32XX_REG_NONE 0xFF
drivers/leds/leds-mlxreg.c +0 -1
@@ -8,7 +8,6 @@#include <linux/io.h> #include <linux/leds.h> #include <linux/module.h> -#include <linux/of_device.h> #include <linux/platform_data/mlxreg.h> #include <linux/platform_device.h> #include <linux/regmap.h>
drivers/leds/leds-pca9532.c +0 -1
@@ -18,7 +18,6 @@#include <linux/leds-pca9532.h> #include <linux/gpio/driver.h> #include <linux/of.h> -#include <linux/of_device.h> /* m = num_leds*/ #define PCA9532_REG_INPUT (i) ((i) >> 3)
drivers/leds/leds-pm8058.c +0 -1
@@ -4,7 +4,6 @@#include <linux/leds.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/regmap.h>
drivers/leds/leds-pwm.c +1 -1
@@ -12,7 +12,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/platform_device.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/leds.h> #include <linux/err.h> #include <linux/pwm.h>
drivers/leds/leds-spi-byte.c +1 -1
@@ -30,7 +30,7 @@#include <linux/leds.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/spi/spi.h> #include <linux/mutex.h> #include <uapi/linux/uleds.h>
drivers/leds/leds-syscon.c +1 -2
@@ -7,8 +7,7 @@*/ #include <linux/io.h> #include <linux/init.h> -#include <linux/of_device.h> -#include <linux/of_address.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/stat.h> #include <linux/slab.h>
drivers/leds/leds-ti-lmu-common.c +1 -1
@@ -7,7 +7,7 @@#include <linux/bitops.h> #include <linux/err.h> -#include <linux/of_device.h> +#include <linux/property.h> #include <linux/leds-ti-lmu-common.h>
drivers/leds/leds-tlc591xx.c +0 -1
@@ -8,7 +8,6 @@#include <linux/leds.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/regmap.h> #include <linux/slab.h>
drivers/leds/rgb/leds-qcom-lpg.c +0 -1
@@ -9,7 +9,6 @@#include <linux/led-class-multicolor.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pwm.h> #include <linux/regmap.h>
Signature · 1 line
2.40.1
Re: (subset) [PATCH] leds: Explicitly include correct DT includes
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.[...]
Applied, thanks!
[1/1] leds: Explicitly include correct DT includes
commit: 3192f141240336dd6d7675ff374757006fed1916
--
Lee Jones [李琼斯]