#include "compat-2.6.34.h"
-static mmc_pm_flag_t compat_mmc_pm_flags;
+static mmc_pm_flag_t backport_mmc_pm_flags;
-void init_compat_mmc_pm_flags(void)
+void backport_init_mmc_pm_flags(void)
{
- compat_mmc_pm_flags = 0;
+ backport_mmc_pm_flags = 0;
}
mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func)
{
- return compat_mmc_pm_flags;
+ return backport_mmc_pm_flags;
}
int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
#include <linux/mmc/sdio_func.h>
-void init_compat_mmc_pm_flags(void);
+void backport_init_mmc_pm_flags(void);
#else /* Kernels >= 2.6.34 */
-static inline void init_compat_mmc_pm_flags(void)
+static inline void backport_init_mmc_pm_flags(void)
{
}
#include <linux/module.h>
+#include "compat-2.6.34.h"
MODULE_AUTHOR("Luis R. Rodriguez");
-MODULE_DESCRIPTION("Kernel compatibility module");
+MODULE_DESCRIPTION("Kernel backport module");
MODULE_LICENSE("GPL");
#ifndef COMPAT_BASE
MODULE_PARM_DESC(compat_version,
"Version of the kernel compat backport work");
-void compat_dependency_symbol(void)
+void backport_dependency_symbol(void)
{
}
-EXPORT_SYMBOL_GPL(compat_dependency_symbol);
+EXPORT_SYMBOL_GPL(backport_dependency_symbol);
-static int __init compat_init(void)
+static int __init backport_init(void)
{
- compat_pm_qos_power_init();
- compat_system_workqueue_create();
- init_compat_mmc_pm_flags();
+ backport_pm_qos_power_init();
+ backport_system_workqueue_create();
+ backport_init_mmc_pm_flags();
printk(KERN_INFO
COMPAT_PROJECT " backport release: "
return 0;
}
-module_init(compat_init);
+module_init(backport_init);
-static void __exit compat_exit(void)
+static void __exit backport_exit(void)
{
- compat_pm_qos_power_deinit();
- compat_system_workqueue_destroy();
+ backport_pm_qos_power_deinit();
+ backport_system_workqueue_destroy();
return;
}
-module_exit(compat_exit);
+module_exit(backport_exit);
/*
* This initializes pm-qos for older kernels.
*/
-int compat_pm_qos_power_init(void)
+int backport_pm_qos_power_init(void)
{
int ret = 0;
return ret;
}
-int compat_pm_qos_power_deinit(void)
+int backport_pm_qos_power_deinit(void)
{
int ret = 0;
* This pm-qos implementation is copied verbatim from the kernel
* written by mark gross mgross@linux.intel.com. You don't have
* to do anythinig to use pm-qos except use the same exported
- * routines as used in newer kernels. The compat_pm_qos_power_init()
+ * routines as used in newer kernels. The backport_pm_qos_power_init()
* defned below is used by the compat module to initialize pm-qos.
*/
-int compat_pm_qos_power_init(void);
-int compat_pm_qos_power_deinit(void);
+int backport_pm_qos_power_init(void);
+int backport_pm_qos_power_deinit(void);
/*
* 2.6.25 adds PM_EVENT_HIBERNATE as well here but
* Kernels >= 2.6.25 have pm-qos and its initialized as part of
* the bootup process
*/
-static inline int compat_pm_qos_power_init(void)
+static inline int backport_pm_qos_power_init(void)
{
return 0;
}
-static inline int compat_pm_qos_power_deinit(void)
+static inline int backport_pm_qos_power_deinit(void)
{
return 0;
}
extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func);
extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags);
-void init_compat_mmc_pm_flags(void);
-
#define netdev_mc_count(dev) ((dev)->mc_count)
#define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0)
#else /* Kernels >= 2.6.34 */
-static inline void init_compat_mmc_pm_flags(void)
-{
-}
-
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)) */
#define system_nrt_wq LINUX_BACKPORT(system_nrt_wq)
extern struct workqueue_struct *system_nrt_wq;
-void compat_system_workqueue_create(void);
-void compat_system_workqueue_destroy(void);
+void backport_system_workqueue_create(void);
+void backport_system_workqueue_destroy(void);
#define schedule_work LINUX_BACKPORT(schedule_work)
int schedule_work(struct work_struct *work);
#else
-static inline void compat_system_workqueue_create(void)
+static inline void backport_system_workqueue_create(void)
{
}
-static inline void compat_system_workqueue_destroy(void)
+static inline void backport_system_workqueue_destroy(void)
{
}
* To the call to the initfn we added the symbol dependency on compat
* to make sure that compat.ko gets loaded for any compat modules.
*/
-void compat_dependency_symbol(void);
+void backport_dependency_symbol(void);
#undef module_init
#define module_init(initfn) \
- static int __init __init_compat(void) \
+ static int __init __init_backport(void) \
{ \
- compat_dependency_symbol(); \
+ backport_dependency_symbol(); \
return initfn(); \
} \
- int init_module(void) __attribute__((alias("__init_compat")));
+ int init_module(void) __attribute__((alias("__init_backport")));
/*
* Each compat file represents compatibility code for new kernel