[PATCH] hwmon: (ltc2947) Make ltc2947.h self-contained

From: Uwe Kleine-König

Date: Mon Nov 16 2026 - 13:10:08 EST


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@xxxxxxxxxxxx>
---
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