]> git.openfabrics.org - ~emulex/for-vlad/compat.git/commitdiff
Skip MMC/SDIO backport for kernels <= 2.6.23
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 11 Jan 2010 20:18:59 +0000 (12:18 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 11 Jan 2010 20:18:59 +0000 (12:18 -0800)
This allows compilation of compat for 2.6.23 for builds
that do not require MMC/SDIO. Anyone interested in MMC/SDIO
backport support should look to see if its possible to
backport/add MMC/SDIO support to older kernels. That's
likeley a project on its own though, not sure.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat/compat-2.6.27.c
include/linux/compat-2.6.27.h

index 7fffe8e07355ac4ff532d66911373b1efca979cb..4fef36ab8710e50138852d51d72d72444dec6c57 100644 (file)
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
 
 #include <linux/pci.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
+#endif
 
 /* rfkill notification chain */
 #define RFKILL_STATE_CHANGED            0x0001  /* state of a normal rfkill
@@ -67,6 +69,7 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state)
 }
 EXPORT_SYMBOL(pci_pme_capable);
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
 /**
  *     mmc_align_data_size - pads a transfer size to a more optimal value
  *     @card: the MMC card associated with the data transfer
@@ -201,6 +204,7 @@ unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz)
        return orig_sz;
 }
 EXPORT_SYMBOL_GPL(sdio_align_size);
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) */
 
 
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) */
index 3b29294c3dc882dee9c390a6de3acc54c9b815c0..3e5e661c0e438174960c6b882c70720a90d171d3 100644 (file)
@@ -9,8 +9,10 @@
 #include <linux/list.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/sdio_func.h>
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) */
 #include <linux/netdevice.h>
 #include <linux/workqueue.h>
 #include <net/iw_handler.h>
@@ -159,8 +161,10 @@ static inline void list_splice_tail_init(struct list_head *list,
        }
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
 extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
 extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) */
 
 #define iwe_stream_add_value(info, event, value, ends, iwe, event_len) iwe_stream_add_value(event, value, ends, iwe, event_len)
 #define iwe_stream_add_point(info, stream, ends, iwe, extra) iwe_stream_add_point(stream, ends, iwe, extra)