[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231011084117.jvfl7xmbcgsu7uyl@pengutronix.de>
Date: Wed, 11 Oct 2023 10:41:17 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Rob Herring <robh@...nel.org>
Cc: Thierry Reding <thierry.reding@...il.com>,
linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: pxa: Explicitly include correct DT includes
On Mon, Oct 09, 2023 at 12:29:17PM -0500, Rob Herring wrote:
> The DT of_device.h and of_platform.h date back to the separate
> of_platform_bus_type before it as merged into the regular platform bus.
> As part of that merge prepping Arm DT support 13 years ago, they
> "temporarily" include each other. They also include platform_device.h
> and of.h. As a result, there's a pretty much random mix of those include
> files used throughout the tree. In order to detangle these headers and
> replace the implicit includes with struct declarations, users need to
> explicitly include the correct includes.
>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> drivers/pwm/pwm-pxa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
> index 1e475ed10180..78b04e017c49 100644
> --- a/drivers/pwm/pwm-pxa.c
> +++ b/drivers/pwm/pwm-pxa.c
> @@ -24,7 +24,7 @@
> #include <linux/clk.h>
> #include <linux/io.h>
> #include <linux/pwm.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
Even without both headers the driver compiles fine as linux/pwm.h
includes of.h.
I think we should do:
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index d2f9f690a9c1..9e35970ca2ab 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -4,8 +4,8 @@
#include <linux/err.h>
#include <linux/mutex.h>
-#include <linux/of.h>
+struct of_phandle_args;
struct pwm_chip;
/**
drivers/pmw/* compiles fine with this change.
Other than that:
Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists