All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (ltc2947) Make ltc2947.h self-contained
@ 2026-11-16 18:09 Uwe Kleine-König
  2026-11-16 18:15 ` sashiko-bot
  2026-11-16 19:26 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-11-16 18:09 UTC (permalink / raw)
  To: Nuno Sá, Guenter Roeck; +Cc: linux-hwmon, linux-kernel

When ltc2947.h is included without a previous definition of
of_device_id, the compiler wails:

	drivers/hwmon/ltc2947.h:11:34: error: array type has incomplete element type ‘struct of_device_id’
	   11 | extern const struct of_device_id ltc2947_of_match[];
	      |                                  ^~~~~~~~~~~~~~~~

A forward declaration is not enough to fix that, so include the header
providing `struct of_device_id`.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/hwmon/ltc2947.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hwmon/ltc2947.h b/drivers/hwmon/ltc2947.h
index 5b8ff81a3dba..eb3613f4d4cd 100644
--- a/drivers/hwmon/ltc2947.h
+++ b/drivers/hwmon/ltc2947.h
@@ -2,6 +2,8 @@
 #ifndef _LINUX_LTC2947_H
 #define _LINUX_LTC2947_H
 
+#include <linux/device-id/of.h>
+
 struct regmap;
 
 extern const struct of_device_id ltc2947_of_match[];

base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
-- 
2.56.0.rc1


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

end of thread, other threads:[~2026-11-16 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 18:09 [PATCH] hwmon: (ltc2947) Make ltc2947.h self-contained Uwe Kleine-König
2026-11-16 18:15 ` sashiko-bot
2026-11-16 19:26 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.