From: Luis R. Rodriguez Date: Mon, 11 Jan 2010 20:18:59 +0000 (-0800) Subject: Skip MMC/SDIO backport for kernels <= 2.6.23 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=819330bf6c14af584b494e590df68cbca388a921;p=openwrt%2Fstaging%2Fblogic.git Skip MMC/SDIO backport for kernels <= 2.6.23 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 --- diff --git a/compat/compat-2.6.27.c b/compat/compat-2.6.27.c index 7fffe8e07355..4fef36ab8710 100644 --- a/compat/compat-2.6.27.c +++ b/compat/compat-2.6.27.c @@ -13,10 +13,12 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) #include #include #include #include +#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) */ diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index 3b29294c3dc8..3e5e661c0e43 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -9,8 +9,10 @@ #include #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) #include #include +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) */ #include #include #include @@ -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)