From: matt mooney <mfm@muteddisk.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: usbip-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH 2/6] staging: usbip: userspace: move header includes out utils.h
Date: Fri, 27 May 2011 01:44:11 -0700 [thread overview]
Message-ID: <fb944a5003fac31cc37d1a4f2d69c9d91678d7bd.1306485772.git.mfm@muteddisk.com> (raw)
In-Reply-To: <ec9a733eb388e3057d46ca451448e23ca24bd7e9.1306485772.git.mfm@muteddisk.com>
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>
---
drivers/staging/usbip/userspace/src/usbip_bind.c | 3 +-
drivers/staging/usbip/userspace/src/utils.c | 6 ++++-
drivers/staging/usbip/userspace/src/utils.h | 25 +++------------------
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 26cfbad..9869db2 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 35b05e4..6dbfdbd 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 423716d..36ee8d5 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 */
--
1.7.5.1
next prev parent reply other threads:[~2011-05-27 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 8:44 [PATCH 1/6] staging: usbip: userspace: use memset instead of bzero matt mooney
2011-05-27 8:44 ` matt mooney [this message]
2011-05-27 8:44 ` [PATCH 3/6] staging: usbip: change the busid size matt mooney
2011-05-27 8:44 ` [PATCH 4/6] staging: usbip: userspace: usbip_list.c: refactor local USB device listing matt mooney
2011-05-27 8:44 ` [PATCH 5/6] staging: usbip: userspace: rename usbip device and interface matt mooney
2011-05-27 8:44 ` [PATCH 6/6] staging: usbip: userspace: usbip_list.c: cleanup exported device functions matt mooney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb944a5003fac31cc37d1a4f2d69c9d91678d7bd.1306485772.git.mfm@muteddisk.com \
--to=mfm@muteddisk.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=usbip-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®