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-next>] [day] [month] [year] [list]
Date:	Thu, 21 May 2009 15:44:45 +0400
From:	Alexander Beregalov <a.beregalov@...il.com>
To:	gregkh@...e.de
Cc:	linux-kernel@...r.kernel.org, linux-next@...r.kernel.org,
	Alexander Beregalov <a.beregalov@...il.com>
Subject: [PATCH 1/2] Staging: cpc-usb: depends on PROC_FS

Fix this build error when PROC_FS is not enabled:
cpc-usb_drv.c:61:2: error: #error "PROCFS needed"
cpc-usb_drv.c:1159: error: implicit declaration of function 'proc_mkdir'

Signed-off-by: Alexander Beregalov <a.beregalov@...il.com>
---
 drivers/staging/cpc-usb/Kconfig       |    2 +-
 drivers/staging/cpc-usb/cpc-usb_drv.c |    8 +-------
 drivers/staging/cpc-usb/cpc_int.h     |    4 +---
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/cpc-usb/Kconfig b/drivers/staging/cpc-usb/Kconfig
index 00924ce..2be0bc9 100644
--- a/drivers/staging/cpc-usb/Kconfig
+++ b/drivers/staging/cpc-usb/Kconfig
@@ -1,4 +1,4 @@
 config USB_CPC
 	tristate "CPC CAN USB driver"
-	depends on USB
+	depends on USB && PROC_FS
 	default n
diff --git a/drivers/staging/cpc-usb/cpc-usb_drv.c b/drivers/staging/cpc-usb/cpc-usb_drv.c
index 14aca39..d337a97 100644
--- a/drivers/staging/cpc-usb/cpc-usb_drv.c
+++ b/drivers/staging/cpc-usb/cpc-usb_drv.c
@@ -30,9 +30,7 @@
 
 #include <linux/version.h>
 
-#ifdef CONFIG_PROC_FS
-#   include <linux/proc_fs.h>
-#endif
+#include <linux/proc_fs.h>
 
 #include "cpc.h"
 
@@ -57,10 +55,6 @@ MODULE_LICENSE("GPL v2");
 #define USB_CPCUSB_M16C_PRODUCT_ID    0x0888
 #define USB_CPCUSB_LPC2119_PRODUCT_ID 0x0444
 
-#ifndef CONFIG_PROC_FS
-#error "PROCFS needed"
-#endif
-
 #define CPC_USB_PROC_DIR     CPC_PROC_DIR "cpc-usb"
 
 static struct proc_dir_entry *procDir;
diff --git a/drivers/staging/cpc-usb/cpc_int.h b/drivers/staging/cpc-usb/cpc_int.h
index dfdbed1..a0d60c0 100644
--- a/drivers/staging/cpc-usb/cpc_int.h
+++ b/drivers/staging/cpc-usb/cpc_int.h
@@ -15,9 +15,7 @@
 
 #define CPC_MSG_BUF_CNT	1500
 
-#ifdef CONFIG_PROC_FS
-#   define CPC_PROC_DIR "driver/"
-#endif
+#define CPC_PROC_DIR "driver/"
 
 #undef dbg
 #undef err
--
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