[U-Boot-Users] [PATCH 02/11] usb: Clean drivers/usb/Makefile

monstr at seznam.cz
2008-07-14T17:45:36Z

From: Michal Simek <monstr@monstr.eu>

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
drivers/usb/Makefile | 12 ++++++------
drivers/usb/isp116x-hcd.c | 3 ---
drivers/usb/sl811_usb.c | 3 ---
drivers/usb/usb_ohci.c | 3 ---
drivers/usb/usbdcore_ep0.c | 3 ---
drivers/usb/usbdcore_mpc8xx.c | 4 ++--
drivers/usb/usbdcore_omap1510.c | 2 +-
7 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index 252b00e..1388186 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -25,13 +25,13 @@ include $(TOPDIR)/config.mk

LIB := $(obj)libusb.a

-COBJS-y += isp116x-hcd.o
-COBJS-y += sl811_usb.o
-COBJS-y += usb_ohci.o
+COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
+COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
+COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
COBJS-y += usbdcore.o
-COBJS-y += usbdcore_ep0.o
-COBJS-y += usbdcore_mpc8xx.o
-COBJS-y += usbdcore_omap1510.o
+COBJS-$(CONFIG_USB_DEVICE) += usbdcore_ep0.o
+COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o

COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/drivers/usb/isp116x-hcd.c b/drivers/usb/isp116x-hcd.c
index 6b9b23b..e9e69bb 100644
--- a/drivers/usb/isp116x-hcd.c
+++ b/drivers/usb/isp116x-hcd.c
@@ -57,7 +57,6 @@

#include <common.h>

-#ifdef CONFIG_USB_ISP116X_HCD
#include <asm/io.h>
#include <usb.h>
#include <malloc.h>
@@ -1441,5 +1440,3 @@ int usb_lowlevel_stop(void)

return 0;
}
-
-#endif /* CONFIG_USB_ISP116X_HCD */
diff --git a/drivers/usb/sl811_usb.c b/drivers/usb/sl811_usb.c
index 159cc25..cfdd375 100644
--- a/drivers/usb/sl811_usb.c
+++ b/drivers/usb/sl811_usb.c
@@ -36,7 +36,6 @@
*/

#include <common.h>
-#ifdef CONFIG_USB_SL811HS
#include <mpc8xx.h>
#include <usb.h>
#include "sl811.h"
@@ -733,5 +732,3 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,

return status == 0 ? len : status;
}
-
-#endif /* CONFIG_USB_SL811HS */
diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c
index fd60edb..9e7b396 100644
--- a/drivers/usb/usb_ohci.c
+++ b/drivers/usb/usb_ohci.c
@@ -47,8 +47,6 @@

#include <common.h>

-#ifdef CONFIG_USB_OHCI_NEW
-
#include <asm/byteorder.h>

#if defined(CONFIG_PCI_OHCI)
@@ -1910,4 +1908,3 @@ int usb_lowlevel_stop(void)

return 0;
}
-#endif /* CONFIG_USB_OHCI_NEW */
diff --git a/drivers/usb/usbdcore_ep0.c b/drivers/usb/usbdcore_ep0.c
index cf3f382..2395eec 100644
--- a/drivers/usb/usbdcore_ep0.c
+++ b/drivers/usb/usbdcore_ep0.c
@@ -52,7 +52,6 @@

#include <common.h>

-#if defined(CONFIG_USB_DEVICE)
#include "usbdcore.h"

#if 0
@@ -597,5 +596,3 @@ int ep0_recv_setup (struct urb *urb)
}
return -1;
}
-
-#endif
diff --git a/drivers/usb/usbdcore_mpc8xx.c b/drivers/usb/usbdcore_mpc8xx.c
index 122793c..539e0f8 100644
--- a/drivers/usb/usbdcore_mpc8xx.c
+++ b/drivers/usb/usbdcore_mpc8xx.c
@@ -59,7 +59,7 @@
#include <common.h>
#include <config.h>

-#if defined(CONFIG_MPC885_FAMILY) && defined(CONFIG_USB_DEVICE)
+#if defined(CONFIG_USB_DEVICE)
#include <commproc.h>
#include "usbdcore.h"
#include "usbdcore_mpc8xx.h"
@@ -1399,4 +1399,4 @@ static u32 mpc8xx_udc_alloc (u32 data_size, u32 alignment)
return retaddr;
}

-#endif /* CONFIG_MPC885_FAMILY && CONFIG_USB_DEVICE) */
+#endif /* CONFIG_USB_DEVICE) */
diff --git a/drivers/usb/usbdcore_omap1510.c b/drivers/usb/usbdcore_omap1510.c
index 84bb936..8d23537 100644
--- a/drivers/usb/usbdcore_omap1510.c
+++ b/drivers/usb/usbdcore_omap1510.c
@@ -28,7 +28,7 @@

#include <common.h>

-#if defined(CONFIG_OMAP1510) && defined(CONFIG_USB_DEVICE)
+#if defined(CONFIG_USB_DEVICE)

#include <asm/io.h>
#ifdef CONFIG_OMAP_SX1
--
1.5.4.GIT