Skip to contentSkip to conversation

staging:vt6655 Add extern variable in head file

PATCH Greg KH 1 participant 1 message Jan 13, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg KH

author
#1 lore raw
Quoted 25 lines · sun wang

Extern variable must be declared in head file. Compiler can catch the inconsistency when variable changes.

---
 drivers/staging/vt6655/ioctl.c | 1 -
 drivers/staging/vt6655/ioctl.h | 5 +++++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/staging/vt6655/ioctl.c +0 -1
index 970e80d..716fc89 100644
@@ -31,7 +31,6 @@
  */
 
 #include "ioctl.h"
-#include "iocmd.h"
 #include "mac.h"
 #include "card.h"
 #include "hostap.h"
drivers/staging/vt6655/ioctl.h +0 -0
index 2dc5a57..42f6910 100644

drivers/staging/vt6655/ioctl.h line 37

Quoted 8 lines
drivers/staging/vt6655/ioctl.h +5 -0
@@ -30,6 +30,11 @@
 #define __IOCTL_H__
 
 #include "device.h"
+#include "iocmd.h"
+
+#ifdef WPA_SM_Transtatus
+extern SWPAResult wpa_Result;
+#endif

I don't understand, what problem is this solving? This variable isn't in the driver at all.

confused,

greg k-h