mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power: supply: remove unneeded include of linux/leds.h
@ 2023-04-30  6:11 Thomas Weißschuh
  2023-04-30  7:06 ` kernel test robot
  2023-04-30  7:58 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2023-04-30  6:11 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Thomas Weißschuh

Instead of including the full linux/leds.h header file a single
forward-declaration is enough.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
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.
---
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 include/linux/power_supply.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index a427f13c757f..dc5e17e8c919 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -14,10 +14,11 @@
 
 #include <linux/device.h>
 #include <linux/workqueue.h>
-#include <linux/leds.h>
 #include <linux/spinlock.h>
 #include <linux/notifier.h>
 
+struct led_trigger;
+
 /*
  * All voltages, currents, charges, energies, time and temperatures in uV,
  * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise

---
base-commit: 825a0714d2b3883d4f8ff64f6933fb73ee3f1834
change-id: 20230212-include-power_supply-leds-fe1d71c7b7b2

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-30  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30  6:11 [PATCH] power: supply: remove unneeded include of linux/leds.h Thomas Weißschuh
2023-04-30  7:06 ` kernel test robot
2023-04-30  7:58 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®