lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Apr 2014 13:28:21 +0100
From:	Peter Griffin <peter.griffin@...aro.org>
To:	linux-kernel@...r.kernel.org
Cc:	linaro-kernel@...ts.linaro.org, Arnd Bergmann <arnd@...db.de>,
	Peter Griffin <peter.griffin@...aro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	linux-fbdev@...r.kernel.org, Raphael Assenat <raph@...com>,
	Mike Rapoport <mike@...pulab.co.il>
Subject: [PATCH 05/13] video/mbx: fix building debugfs support

From: Arnd Bergmann <arnd@...db.de>

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@...db.de>
Signed-off-by: Peter Griffin <peter.griffin@...aro.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@...com>
Cc: linux-fbdev@...r.kernel.org
Cc: Raphael Assenat <raph@...com>
Cc: Mike Rapoport <mike@...pulab.co.il>
---
 drivers/video/fbdev/mbx/Makefile     |    3 +--
 drivers/video/fbdev/mbx/mbxdebugfs.c |    2 +-
 drivers/video/fbdev/mbx/mbxfb.c      |    2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/mbx/Makefile b/drivers/video/fbdev/mbx/Makefile
index 16c1165..d7ae5a9 100644
--- a/drivers/video/fbdev/mbx/Makefile
+++ b/drivers/video/fbdev/mbx/Makefile
@@ -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
diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c
index 4449f24..e3bc00a 100644
--- a/drivers/video/fbdev/mbx/mbxdebugfs.c
+++ b/drivers/video/fbdev/mbx/mbxdebugfs.c
@@ -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;
 }
 
diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c
index f0a5392..2bd52ed 100644
--- a/drivers/video/fbdev/mbx/mbxfb.c
+++ b/drivers/video/fbdev/mbx/mbxfb.c
@@ -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)
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ