lkml.org 
[lkml]   [2017]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCHv2] drm/prime: Forward declare struct device
Date

We need a declaration of struct device to avoid warnings:

In file included from include/drm/drm_file.h:38:0,
from drivers/gpu/drm/drm_file.c:38:
include/drm/drm_prime.h:71:14: warning: 'struct device' declared inside
parameter list will not be visible outside of this definition or
declaration
struct device *attach_dev);
^~~~~~

Forward declare it.

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
v2: Switch to foward declaration instead of including a header.
---
include/drm/drm_prime.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 46fd1fb..59ccab4 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -50,6 +50,8 @@ struct drm_prime_file_private {
struct rb_root handles;
};

+struct device;
+
struct dma_buf_export_info;
struct dma_buf;

--
2.7.4
\
 
 \ /
  Last update: 2017-05-10 21:22    [W:0.035 / U:17.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site