]> git.openfabrics.org - ~emulex/for-vlad/compat.git/commitdiff
compat: build pccard and pcmcia condituinaly
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 13 Jan 2010 21:20:19 +0000 (22:20 +0100)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 13 Jan 2010 22:16:45 +0000 (14:16 -0800)
If the kernel does not include pcmcia, compat.o should not relay on
methods provided by it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/compat-2.6.28.c
compat/compat-2.6.33.c
include/linux/compat-2.6.28.h
include/linux/compat-2.6.33.h

index 87ad2d58f2f43d504391cf29c8bf4c461c1785e8..e3f3a1be37eacd665b93c1577a4bde647501f150 100644 (file)
@@ -85,6 +85,8 @@ void usb_poison_urb(struct urb *urb)
 EXPORT_SYMBOL_GPL(usb_poison_urb);
 #endif
 
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
+
 #include <pcmcia/ds.h>
 struct pcmcia_cfg_mem {
        tuple_t tuple;
@@ -160,6 +162,8 @@ next_entry:
 }
 EXPORT_SYMBOL(pcmcia_loop_config);
 
+#endif /* CONFIG_PCMCIA */
+
 void usb_unpoison_urb(struct urb *urb)
 {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
index 052c609925923448bbeb3840b661dfe58c0358e3..055082e76c954a23893a651a8ab66c086238b7b7 100644 (file)
@@ -12,6 +12,9 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
 
+#include <linux/autoconf.h>
+
+#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
 
 /**
  * pccard_loop_tuple() - loop over tuples in the CIS
@@ -73,6 +76,7 @@ next_entry:
 EXPORT_SYMBOL(pccard_loop_tuple);
 /* Source: drivers/pcmcia/cistpl.c */
 
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 
 struct pcmcia_loop_mem {
        struct pcmcia_device *p_dev;
@@ -125,6 +129,9 @@ int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
 EXPORT_SYMBOL(pcmcia_loop_tuple);
 /* Source: drivers/pcmcia/pcmcia_resource.c */
 
+#endif /* CONFIG_PCMCIA */
+
+#endif /* CONFIG_PCCARD */
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
 
index bc260860bfe0d4b2a7b7200d1a883f53d3fde23d..c7dcb798c6e1aa8565d55f13bd47f97446144cee 100644 (file)
@@ -27,6 +27,8 @@
 })
 #endif /* From include/asm-generic/bug.h */
 
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
+
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
@@ -45,6 +47,8 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
                                                 void *priv_data),
                       void *priv_data);
 
+#endif /* CONFIG_PCMCIA */
+
 /* USB anchors were added as of 2.6.23 */
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
 #if 0
index 81239148af43aca6ffb7cf176316e51c50685c55..da5821b82e43e8822fd104c105ca32fadbaa1cdf 100644 (file)
@@ -30,6 +30,10 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
        return skb;
 }
 
+#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
+
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
+
 #define pcmcia_request_window(a, b, c) pcmcia_request_window(&a, b, c)
 
 #define pcmcia_map_mem_page(a, b, c) pcmcia_map_mem_page(b, c)
@@ -41,6 +45,8 @@ int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
                                         void *priv_data),
                      void *priv_data);
 
+#endif /* CONFIG_PCMCIA */
+
 /* loop over CIS entries */
 int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
                      cisdata_t code, cisparse_t *parse, void *priv_data,
@@ -48,6 +54,8 @@ int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
                                         cisparse_t *parse,
                                         void *priv_data));
 
+#endif /* CONFIG_PCCARD */
+
 /* Backport for kfifo
  * kfifo_alloc and kfifo_free must be backported manually 
  */