2023-05-02 05:02:59

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH v2 0/2] power: supply: remove unneeded include of linux/leds.h

Currently power_supply.h includes leds.h to get access to
struct led_trigger.
This propagates the inclusion unnecessarily to all users of
power_supply.h.

Replace this inclusion by a single forward declaration.

---
Changes in v2:
- Add an explicit include to drivers/hid/hid-lg4ff.c
- Link to v1: https://lore.kernel.org/r/20230212-include-power_supply-leds-v1-1-7adbf7424002@weissschuh.net

---
Thomas Weißschuh (2):
HID: lg4ff: explicitly include linux/leds.h
power: supply: remove unneeded include of linux/leds.h

drivers/hid/hid-lg4ff.c | 1 +
include/linux/power_supply.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
---
base-commit: 865fdb08197e657c59e74a35fa32362b12397f58
change-id: 20230212-include-power_supply-leds-fe1d71c7b7b2

Best regards,
--
Thomas Weißschuh <[email protected]>


2023-05-02 05:04:59

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH v2 1/2] HID: lg4ff: explicitly include linux/leds.h

Instead of relying on an accidental, transitive inclusion of linux/leds.h
use it directly.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Thomas Weißschuh <[email protected]>
---
drivers/hid/hid-lg4ff.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index e3fcf1353fb3..d55d04c140b9 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -15,6 +15,7 @@
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/hid.h>
+#include <linux/leds.h>

#include "usbhid/usbhid.h"
#include "hid-lg.h"

--
2.40.1