diff mbox

drm/prime: include device.h

Message ID 1494427201-14365-1-git-send-email-labbott@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laura Abbott May 10, 2017, 2:40 p.m. UTC
Explictly add linux/device.h to ensure struct device is defined:

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);
		 ^~~~~~

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
Sorry, missed sending this out
---
 include/drm/drm_prime.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Chris Wilson May 10, 2017, 2:48 p.m. UTC | #1
On Wed, May 10, 2017 at 07:40:01AM -0700, Laura Abbott wrote:
> Explictly add linux/device.h to ensure struct device is defined:
> 
> 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);

We aren't using it for anything other than an opaque pointer, so a
struct device;
forward decl will suffice?
-Chris
diff mbox

Patch

diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 46fd1fb..8ef37c8 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -35,6 +35,7 @@ 
 #include <linux/mutex.h>
 #include <linux/rbtree.h>
 #include <linux/scatterlist.h>
+#include <linux/device.h>
 
 /**
  * struct drm_prime_file_private - per-file tracking for PRIME