[PATCH] drm/panel: novatek-nt36672e: Include <linux/of.h>

Ritesh Kumar posted 1 patch 1 year, 11 months ago
drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] drm/panel: novatek-nt36672e: Include <linux/of.h>
Posted by Ritesh Kumar 1 year, 11 months ago
Include <linux/of.h> instead of <linux/of_device.h> to fix
below compilation errors:

drivers/gpu/drm/panel/panel-novatek-nt36672e.c:564:14: error: implicit declaration of function 'of_device_get_match_data'
  ctx->desc = of_device_get_match_data(dev);
              ^
drivers/gpu/drm/panel/panel-novatek-nt36672e.c:622:34: error: array type has incomplete element type 'struct of_device_id'
 static const struct of_device_id nt36672e_of_match[] = {
                                  ^

Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>

---
In the patch https://lore.kernel.org/all/20231129164316.2663565-1-robh@kernel.org/,
include of <linux/of.h> from of_device.h was removed. This change was not present
in my local build resulting in successful compilation while posting
https://lore.kernel.org/all/20240108095902.22725-3-quic_riteshk@quicinc.com/.
---
 drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
index d4e85c2fc899..cb7406d74466 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
@@ -4,7 +4,7 @@
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regulator/consumer.h>
 
 #include <drm/drm_mipi_dsi.h>
-- 
2.17.1
Re: [PATCH] drm/panel: novatek-nt36672e: Include <linux/of.h>
Posted by Linus Walleij 1 year, 11 months ago
On Tue, Jan 16, 2024 at 8:19 AM Ritesh Kumar <quic_riteshk@quicinc.com> wrote:

> Include <linux/of.h> instead of <linux/of_device.h> to fix
> below compilation errors:
>
> drivers/gpu/drm/panel/panel-novatek-nt36672e.c:564:14: error: implicit declaration of function 'of_device_get_match_data'
>   ctx->desc = of_device_get_match_data(dev);
>               ^
> drivers/gpu/drm/panel/panel-novatek-nt36672e.c:622:34: error: array type has incomplete element type 'struct of_device_id'
>  static const struct of_device_id nt36672e_of_match[] = {
>                                   ^
>
> Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>

Patch applied to drm-misc-next on top of the commit that need fixing.

Yours,
Linus Walleij
Re: [PATCH] drm/panel: novatek-nt36672e: Include <linux/of.h>
Posted by neil.armstrong@linaro.org 1 year, 11 months ago
On 16/01/2024 08:18, Ritesh Kumar wrote:
> Include <linux/of.h> instead of <linux/of_device.h> to fix
> below compilation errors:
> 
> drivers/gpu/drm/panel/panel-novatek-nt36672e.c:564:14: error: implicit declaration of function 'of_device_get_match_data'
>    ctx->desc = of_device_get_match_data(dev);
>                ^
> drivers/gpu/drm/panel/panel-novatek-nt36672e.c:622:34: error: array type has incomplete element type 'struct of_device_id'
>   static const struct of_device_id nt36672e_of_match[] = {
>                                    ^
> 
> Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
> 
> ---
> In the patch https://lore.kernel.org/all/20231129164316.2663565-1-robh@kernel.org/,
> include of <linux/of.h> from of_device.h was removed. This change was not present
> in my local build resulting in successful compilation while posting
> https://lore.kernel.org/all/20240108095902.22725-3-quic_riteshk@quicinc.com/.
> ---
>   drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
> index d4e85c2fc899..cb7406d74466 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
> @@ -4,7 +4,7 @@
>   #include <linux/delay.h>
>   #include <linux/gpio/consumer.h>
>   #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>   #include <linux/regulator/consumer.h>
>   
>   #include <drm/drm_mipi_dsi.h>

Fixes: ea4f9975625a ("drm/panel: Add support for Novatek NT36672E panel driver")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>