Subject: [PATCH -next] random: needs linux/device.h for struct device

From: Randy Dunlap <[email-masked]>
Date: Mon, 04 Nov 2013 08:06:16 -0800

on x86_64:

drivers/char/random.c: In function 'add_device_attach_randomness':
drivers/char/random.c:837:41: error: dereferencing pointer to incomplete type

need to #include <linux/device.h> for struct device, I think.
Yes, that works.

---
From: Randy Dunlap <[email-masked]>

Fix struct device build failure on x86_64 by including <linux/device.h>:

drivers/char/random.c: In function 'add_device_attach_randomness':
drivers/char/random.c:837:41: error: dereferencing pointer to incomplete type

Signed-off-by: Randy Dunlap <[email-masked]>
---
 drivers/char/random.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20131104.orig/drivers/char/random.c
+++ linux-next-20131104/drivers/char/random.c
@@ -240,6 +240,7 @@
 #include <linux/kernel.h>
 #include <linux/major.h>
 #include <linux/string.h>
+#include <linux/device.h>
 #include <linux/fcntl.h>
 #include <linux/slab.h>
 #include <linux/random.h>

---