* [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
* Re: [PATCH] hwmon: (ltc2947) Make ltc2947.h self-contained
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
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-16 18:15 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-hwmon
> 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>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116180950.3894659-2-u.kleine-koenig@baylibre.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hwmon: (ltc2947) Make ltc2947.h self-contained
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
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2026-11-16 19:26 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Nuno Sá, linux-hwmon, linux-kernel
On Mon, Nov 16, 2026 at 07:09:50PM +0100, Uwe Kleine-König wrote:
> 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>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/ltc2947.h | 2 ++
> 1 file changed, 2 insertions(+)
>
>
> base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
>
> 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[];
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox