Skip to content

Commit c32a4e0

Browse files
alexb0gregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a3d97c9 commit c32a4e0

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

drivers/staging/cpc-usb/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
config USB_CPC
22
tristate "CPC CAN USB driver"
3-
depends on USB
3+
depends on USB && PROC_FS
44
default n

drivers/staging/cpc-usb/cpc-usb_drv.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030

3131
#include <linux/version.h>
3232

33-
#ifdef CONFIG_PROC_FS
34-
# include <linux/proc_fs.h>
35-
#endif
33+
#include <linux/proc_fs.h>
3634

3735
#include "cpc.h"
3836

@@ -57,10 +55,6 @@ MODULE_LICENSE("GPL v2");
5755
#define USB_CPCUSB_M16C_PRODUCT_ID 0x0888
5856
#define USB_CPCUSB_LPC2119_PRODUCT_ID 0x0444
5957

60-
#ifndef CONFIG_PROC_FS
61-
#error "PROCFS needed"
62-
#endif
63-
6458
#define CPC_USB_PROC_DIR CPC_PROC_DIR "cpc-usb"
6559

6660
static struct proc_dir_entry *procDir;

drivers/staging/cpc-usb/cpc_int.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515

1616
#define CPC_MSG_BUF_CNT 1500
1717

18-
#ifdef CONFIG_PROC_FS
19-
# define CPC_PROC_DIR "driver/"
20-
#endif
18+
#define CPC_PROC_DIR "driver/"
2119

2220
#undef dbg
2321
#undef err

0 commit comments

Comments
 (0)