diff mbox series

[2/3] drm/etnaviv: replace header include with forward declaration

Message ID 20181217153644.17046-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/etnaviv: remove unnecessary local irq disable | expand

Commit Message

Lucas Stach Dec. 17, 2018, 3:36 p.m. UTC
The etnaviv_gpu header only needs to know about the pointer types, so
replace by a forward declaration and only include the headers where needed.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++
 drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Christian Gmeiner Dec. 17, 2018, 4:05 p.m. UTC | #1
Am Mo., 17. Dez. 2018 um 16:36 Uhr schrieb Lucas Stach <l.stach@pengutronix.de>:
>
> The etnaviv_gpu header only needs to know about the pointer types, so
> replace by a forward declaration and only include the headers where needed.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 5 ++---
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index 293e248e1b29..aefb17e39ad0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -3,10 +3,12 @@
>   * Copyright (C) 2015-2018 Etnaviv Project
>   */
>
> +#include <linux/clk.h>
>  #include <linux/component.h>
>  #include <linux/dma-fence.h>
>  #include <linux/moduleparam.h>
>  #include <linux/of_device.h>
> +#include <linux/regulator/consumer.h>
>  #include <linux/thermal.h>
>
>  #include "etnaviv_cmdbuf.h"
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
> index 74758f21e5d3..56b6a8ee7ec0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
> @@ -6,9 +6,6 @@
>  #ifndef __ETNAVIV_GPU_H__
>  #define __ETNAVIV_GPU_H__
>
> -#include <linux/clk.h>
> -#include <linux/regulator/consumer.h>
> -
>  #include "etnaviv_cmdbuf.h"
>  #include "etnaviv_drv.h"
>
> @@ -88,6 +85,8 @@ struct etnaviv_event {
>
>  struct etnaviv_cmdbuf_suballoc;
>  struct etnaviv_cmdbuf;
> +struct regulator;
> +struct clk;
>
>  #define ETNA_NR_EVENTS 30
>
> --
> 2.19.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 293e248e1b29..aefb17e39ad0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -3,10 +3,12 @@ 
  * Copyright (C) 2015-2018 Etnaviv Project
  */
 
+#include <linux/clk.h>
 #include <linux/component.h>
 #include <linux/dma-fence.h>
 #include <linux/moduleparam.h>
 #include <linux/of_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/thermal.h>
 
 #include "etnaviv_cmdbuf.h"
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
index 74758f21e5d3..56b6a8ee7ec0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
@@ -6,9 +6,6 @@ 
 #ifndef __ETNAVIV_GPU_H__
 #define __ETNAVIV_GPU_H__
 
-#include <linux/clk.h>
-#include <linux/regulator/consumer.h>
-
 #include "etnaviv_cmdbuf.h"
 #include "etnaviv_drv.h"
 
@@ -88,6 +85,8 @@  struct etnaviv_event {
 
 struct etnaviv_cmdbuf_suballoc;
 struct etnaviv_cmdbuf;
+struct regulator;
+struct clk;
 
 #define ETNA_NR_EVENTS 30