video/mbx: fix building debugfs support
authorArnd Bergmann <arnd@arndb.de>
Thu, 24 Apr 2014 12:28:21 +0000 (13:28 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 9 May 2014 09:55:46 +0000 (12:55 +0300)
The mbx framebuffer debugfs support apparently hasn't been able
to build for a long time, at least since 2006 when the u.generic_ip
field in the inode was removed. This fixes the obvious bug, and
also makes it possible to build the driver as a module when
debugfs support is enabled, by simply including the C file.
It's ugly, but it won't make the driver any worse than it
already is, and doesn't require a more invasive change that
might break it further.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Raphael Assenat <raph@8d.com>
Cc: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/mbx/Makefile
drivers/video/fbdev/mbx/mbxdebugfs.c
drivers/video/fbdev/mbx/mbxfb.c

index 16c1165cf9c78cdcf5e61b7500f4657144004b85..d7ae5a9bb376e8a41760db91f42a7aecc4cc1214 100644 (file)
@@ -1,4 +1,3 @@
 # Makefile for the 2700G controller driver.
 
-obj-$(CONFIG_FB_MBX)      += mbxfb.o
-obj-$(CONFIG_FB_MBX_DEBUG) += mbxfbdebugfs.o
+obj-y                  += mbxfb.o
index 4449f249b0e7cefce685cd8e9f30152df76ca479..e3bc00a75296558591884453c1dacfc5c1fa8465 100644 (file)
@@ -17,7 +17,7 @@ struct mbxfb_debugfs_data {
 
 static int open_file_generic(struct inode *inode, struct file *file)
 {
-       file->private_data = inode->u.generic_ip;
+       file->private_data = inode->i_private;
        return 0;
 }
 
index f0a5392f5fd33b21b5be40040ea1dbbf931bddf5..2bd52ed8832cfa0f24c88efdb5c3df29c4e3fa5c 100644 (file)
@@ -877,6 +877,8 @@ static int mbxfb_resume(struct platform_device *dev)
 #ifndef CONFIG_FB_MBX_DEBUG
 #define mbxfb_debugfs_init(x)  do {} while(0)
 #define mbxfb_debugfs_remove(x)        do {} while(0)
+#else
+#include "mbxdebugfs.c"
 #endif
 
 #define res_size(_r) (((_r)->end - (_r)->start) + 1)