[PATCH v2 1/3] mtd: maps: vmu-flash: fix build error due to missing include of linux/device.h

Florian Fuchs <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.drivers.mtd,gmane.linux.kernel
Message-ID <[email protected]>
Fix build error by adding the missing include of linux/device.h
linux/maple.h embeds struct device via struct maple_device, which
requires the definition. Otherwise results in build error:

./include/linux/maple.h:81:16: error: field 'dev' has incomplete type
  struct device dev;
                ^~~
./include/linux/maple.h:86:23: error: field 'drv' has incomplete type
  struct device_driver drv;
                       ^~~

Fixes: 313162d0b838 ("device.h: audit and cleanup users in main include dir")
Signed-off-by: Florian Fuchs <[email protected]>
---
v1->v2: no functional change, just rebase patch

v1: https://lore.kernel.org/lkml/[email protected]/

 include/linux/maple.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/maple.h b/include/linux/maple.h
index 3be4e567473c..22f2930251ed 100644
--- a/include/linux/maple.h
+++ b/include/linux/maple.h
@@ -2,10 +2,9 @@
 #ifndef __LINUX_MAPLE_H
 #define __LINUX_MAPLE_H
 
+#include <linux/device.h>
 #include <mach/maple.h>
 
-struct device;
-
 /* Maple Bus command and response codes */
 enum maple_code {
 	MAPLE_RESPONSE_FILEERR =	-5,
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.