summaryrefslogtreecommitdiff
path: root/drivers/staging/usbip
diff options
context:
space:
mode:
authormatt mooney <mfm@muteddisk.com>2011-05-27 01:44:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 14:26:17 -0700
commit4cbab52d18fc35e3c66f68e0382cd0815d31bb5f (patch)
tree89c08552dd47959fe4169c125c25108ceae2cc86 /drivers/staging/usbip
parent950a4cd8fcc61ffc7bb8cd5890e80e7459e22597 (diff)
staging: usbip: userspace: move header includes out utils.h
The includes have been moved out of utils.h to their respective source files where they are suppose to be. An include guard is also added to utils.h Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r--drivers/staging/usbip/userspace/src/usbip_bind.c3
-rw-r--r--drivers/staging/usbip/userspace/src/utils.c6
-rw-r--r--drivers/staging/usbip/userspace/src/utils.h25
3 files changed, 11 insertions, 23 deletions
diff --git a/drivers/staging/usbip/userspace/src/usbip_bind.c b/drivers/staging/usbip/userspace/src/usbip_bind.c
index 26cfbadb46c7..9869db277cc0 100644
--- a/drivers/staging/usbip/userspace/src/usbip_bind.c
+++ b/drivers/staging/usbip/userspace/src/usbip_bind.c
@@ -18,11 +18,12 @@
#include <sysfs/libsysfs.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
-#include <getopt.h>
#include <fcntl.h>
+#include <getopt.h>
#include <unistd.h>
#include "usbip_common.h"
diff --git a/drivers/staging/usbip/userspace/src/utils.c b/drivers/staging/usbip/userspace/src/utils.c
index 35b05e4506fa..6dbfdbd11d2b 100644
--- a/drivers/staging/usbip/userspace/src/utils.c
+++ b/drivers/staging/usbip/userspace/src/utils.c
@@ -4,9 +4,13 @@
*/
#include <sysfs/libsysfs.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+
#include <fcntl.h>
#include <libgen.h>
-#include <string.h>
#include <unistd.h>
#include "usbip_common.h"
diff --git a/drivers/staging/usbip/userspace/src/utils.h b/drivers/staging/usbip/userspace/src/utils.h
index 423716ddb1f9..36ee8d5ba45a 100644
--- a/drivers/staging/usbip/userspace/src/utils.h
+++ b/drivers/staging/usbip/userspace/src/utils.h
@@ -1,26 +1,7 @@
+#ifndef __UTILS_H
+#define __UTILS_H
-#ifdef HAVE_CONFIG_H
-#include "../config.h"
-#endif
-
-#define _GNU_SOURCE
-#include <string.h>
-#include <sys/un.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <sysfs/libsysfs.h>
-#include <glib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-
-
/* Be sync to kernel header */
#define BUS_ID_SIZE 20
@@ -37,3 +18,5 @@ int write_bConfigurationValue(char *busid, int config);
int read_bDeviceClass(char *busid);
int readline(int sockfd, char *str, int strlen);
int writeline(int sockfd, char *buff, int bufflen);
+
+#endif /* __UTILS_H */