usb:gadget:Remove redundant #includes for USB composite gadget and its functions
authorLukasz Majewski <l.majewski@samsung.com>
Tue, 17 Sep 2013 13:58:22 +0000 (15:58 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 24 Sep 2013 15:51:36 +0000 (17:51 +0200)
Only the <linux/usb/gadget.h> requires error.h include. Hence, several
includes of error.h at USB gadget functions are not needed.

Moreover unnecessary malloc.h includes were also removed.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
common/cmd_dfu.c
common/cmd_usb_mass_storage.c
drivers/usb/gadget/g_dnl.c
include/linux/usb/gadget.h

index d3658cf..7ce92ce 100644 (file)
@@ -9,10 +9,7 @@
  */
 
 #include <common.h>
-#include <command.h>
-#include <malloc.h>
 #include <dfu.h>
-#include <asm/errno.h>
 #include <g_dnl.h>
 
 static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
index 33a4715..ccf7195 100644 (file)
@@ -5,7 +5,6 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <errno.h>
 #include <common.h>
 #include <command.h>
 #include <g_dnl.h>
index 19011bf..29d08a3 100644 (file)
@@ -7,7 +7,6 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <errno.h>
 #include <common.h>
 #include <malloc.h>
 
index 220d068..a8a5763 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef __LINUX_USB_GADGET_H
 #define __LINUX_USB_GADGET_H
 
+#include <errno.h>
 #include <linux/list.h>
 
 struct usb_ep;