From 80deffd6ba98f1a4a2825e2815dcffa339abfd6a Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 19 Jan 2010 15:59:13 -0800 Subject: [PATCH] Fix build with CONFIG_USB disabled Signed-off-by: Luis R. Rodriguez --- compat/compat-2.6.28.c | 6 +++++- compat/compat-2.6.29.c | 2 ++ include/linux/compat-2.6.28.h | 3 +++ include/linux/compat-2.6.29.h | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/compat/compat-2.6.28.c b/compat/compat-2.6.28.c index e3f3a1b..a141859 100644 --- a/compat/compat-2.6.28.c +++ b/compat/compat-2.6.28.c @@ -17,6 +17,7 @@ /* 2.6.28 compat code goes here */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) +#if defined(CONFIG_USB) /* * Compat-wireless notes for USB backport stuff: * @@ -84,6 +85,7 @@ void usb_poison_urb(struct urb *urb) } EXPORT_SYMBOL_GPL(usb_poison_urb); #endif +#endif /* CONFIG_USB */ #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) @@ -164,6 +166,8 @@ EXPORT_SYMBOL(pcmcia_loop_config); #endif /* CONFIG_PCMCIA */ +#if defined(CONFIG_USB) + void usb_unpoison_urb(struct urb *urb) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) @@ -286,9 +290,9 @@ int usb_anchor_empty(struct usb_anchor *anchor) } EXPORT_SYMBOL_GPL(usb_anchor_empty); +#endif /* CONFIG_USB */ #endif - void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) { /* diff --git a/compat/compat-2.6.29.c b/compat/compat-2.6.29.c index 50100d9..48e72a3 100644 --- a/compat/compat-2.6.29.c +++ b/compat/compat-2.6.29.c @@ -16,6 +16,7 @@ #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) +#if defined(CONFIG_USB) /** * usb_unpoison_anchored_urbs - let an anchor be used successfully again * @anchor: anchor the requests are bound to @@ -36,6 +37,7 @@ void usb_unpoison_anchored_urbs(struct usb_anchor *anchor) spin_unlock_irqrestore(&anchor->lock, flags); } EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs); +#endif /* CONFIG_USB */ #endif /** diff --git a/include/linux/compat-2.6.28.h b/include/linux/compat-2.6.28.h index c7dcb79..13a0367 100644 --- a/include/linux/compat-2.6.28.h +++ b/include/linux/compat-2.6.28.h @@ -51,6 +51,8 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, /* USB anchors were added as of 2.6.23 */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) + +#if defined(CONFIG_USB) #if 0 extern void usb_poison_urb(struct urb *urb); #endif @@ -63,6 +65,7 @@ extern void usb_poison_anchored_urbs(struct usb_anchor *anchor); extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor); extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor); extern int usb_anchor_empty(struct usb_anchor *anchor); +#endif /* CONFIG_USB */ #endif diff --git a/include/linux/compat-2.6.29.h b/include/linux/compat-2.6.29.h index 318cdf4..27f1325 100644 --- a/include/linux/compat-2.6.29.h +++ b/include/linux/compat-2.6.29.h @@ -47,7 +47,9 @@ static inline struct net_device_stats *dev_get_stats(struct net_device *dev) } #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) +#if defined(CONFIG_USB) extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor); +#endif /* CONFIG_USB */ #endif #define DIV_ROUND_CLOSEST(x, divisor)( \ -- 2.41.0